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 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>
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Insert
char *ret;
#ifdef PATH_MAX
ret = xmalloc (PATH_MAX);
- (void) realpath (path, ret);
+ if (!realpath (path, ret))
+ return NULL;
#else
ret = realpath (path, NULL);
#endif