GNOME Bugzilla – Bug 781383
[PATCH] Switch to modern realpath()
Last modified: 2018-12-25 15:39:00 UTC
Created attachment 349916 [details] [review] Git commit When the canonialize.c code (i.e. menu_canonicalize_file_name()) was introduced, it was 2004 or earlier[1], and there was no non-buggy realpath() (see the "BUGS" section in realpath(3) [2]). Now that POSIX.1-2007 standardized the resolved_path=NULL feature, and that that is implemented in glibc (years before that, even) and in libc's of other OSes, it is possible to simplify the gnome-menus code a bit. The proposed patch just switches from menu_canonicalize_file_name() to realpath(), dropping the whole canonicalize.{c,h} code. The dropped symbol is not part of the exported API & ABI, so this should pose no compatibility issues for the libgnome-menu-3 shared library. [1] the Git history for it starts at 2004, but the copyright refers to years before that [2] http://man7.org/linux/man-pages/man3/realpath.3.html
Forwarded as PR in gitlab: https://gitlab.gnome.org/GNOME/gnome-menus/merge_requests/4
This problem has been fixed in the unstable development version. The fix will be available in the next major software release.