[bug #28422] [util/misc.c] realpath(path, NULL) leads to segfault

2009-12-27 Thread Grégoire Sutre
URL: http://savannah.gnu.org/bugs/?28422 Summary: [util/misc.c] realpath(path, NULL) leads to segfault Project: GNU GRUB Submitted by: gsutre Submitted on: Mon 28 Dec 2009 12:56:47 AM GMT Category: Compilation

[bug #28422] [util/misc.c] realpath(path, NULL) leads to segfault

2009-12-27 Thread Vladimir Serbinenko
Follow-up Comment #1, bug #28422 (project grub): This patch is inappropriate. It introduces arbitrary limit on pathlen even on platforms that aren't limited in this way (e.g. GNU/Hurd). If you make a patch with something like: #ifdef __NetBSD__ p = xmalloc (PATH_MAX); realpath (path, p); #else p

[bug #28422] [util/misc.c] realpath(path, NULL) leads to segfault

2009-12-27 Thread Robert Millan
Follow-up Comment #2, bug #28422 (project grub): Grégorie, could you please check if linking grub-mkrelpath with canonicalize-lgpl.c from Gnulib resolves your problem? If so, I'll import it. It basically boils down to the same kludge, but I'd rather have it in external Gnulib code than in GRUB

[bug #28422] [util/misc.c] realpath(path, NULL) leads to segfault

2009-12-27 Thread Robert Millan
Follow-up Comment #4, bug #28422 (project grub): Hi Grégoire, Sorry to bother you, but after discussing this with Vladimir and thinking a bit more about it, I think we can live with an ifdef in our code if it's confined to util/misc.c and reasonably platform-independant. Please let me know if