mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* kern/emu/misc.c (canonicalize_file_name): realpath can still
return NULL for various reasons even if it has a maximum-length buffer: for example, there might be a symlink loop, or the path might exceed PATH_MAX. If this happens, return NULL.
This commit is contained in:
1 parent
5fdba519bb
commit
db2102a046
2 files changed
+9
-1
No files matched your search
@@ -1,3 +1,10 @@
|
|||||||
|
2010-05-27 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
* kern/emu/misc.c (canonicalize_file_name): realpath can still
|
||||||
|
return NULL for various reasons even if it has a maximum-length
|
||||||
|
buffer: for example, there might be a symlink loop, or the path
|
||||||
|
might exceed PATH_MAX. If this happens, return NULL.
|
||||||
|
|
||||||
2010-05-27 Robert Millan <rmh@gnu.org>
|
2010-05-27 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Insert
|
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Insert
|
||||||
|
|||||||
+2
-1
@@ -185,7 +185,8 @@ canonicalize_file_name (const char *path)
|
|||||||
char *ret;
|
char *ret;
|
||||||
#ifdef PATH_MAX
|
#ifdef PATH_MAX
|
||||||
ret = xmalloc (PATH_MAX);
|
ret = xmalloc (PATH_MAX);
|
||||||
(void) realpath (path, ret);
|
if (!realpath (path, ret))
|
||||||
|
return NULL;
|
||||||
#else
|
#else
|
||||||
ret = realpath (path, NULL);
|
ret = realpath (path, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user