[PATCH] Fix off-by-one invalid memory access
Vegard Nossum
vegard.nossum at gmail.com
Sat Nov 3 14:20:45 CET 2007
Hi,
I find that the xfce_mkdirhier() function accesses p[1] even if p[0] has
been detected to be the end of the string. Here follows a simple patch
to remedy this error.
Kind regards,
Vegard Nossum
P.S. The "Development" link at http://www.xfce.org/development/ actually
points to the "goodies-dev" mailing list, which I believe is wrong. So
there was a bit of confusion finding the correct mailing list.
$ svn diff libxfce4util/xfce-fileutils.c
Index: libxfce4util/xfce-fileutils.c
===================================================================
--- libxfce4util/xfce-fileutils.c (revision 26244)
+++ libxfce4util/xfce-fileutils.c (working copy)
@@ -93,7 +93,7 @@
*p = '\0';
- if (p[1] == '\0')
+ if (!last && p[1] == '\0')
last = 1;
if (first)
More information about the Xfce4-dev
mailing list