Author: jasper
Date: 2007-11-04 08:45:06 +0000 (Sun, 04 Nov 2007)
New Revision: 26250

Modified:
   libxfce4util/branches/xfce_4_4/libxfce4util/xfce-fileutils.c
Log:
Fix possible buffer overflow, reported by Vegard Nosum on the mailing list.

Modified: libxfce4util/branches/xfce_4_4/libxfce4util/xfce-fileutils.c
===================================================================
--- libxfce4util/branches/xfce_4_4/libxfce4util/xfce-fileutils.c        
2007-11-03 21:21:09 UTC (rev 26249)
+++ libxfce4util/branches/xfce_4_4/libxfce4util/xfce-fileutils.c        
2007-11-04 08:45:06 UTC (rev 26250)
@@ -90,12 +90,11 @@
         last = 1;
       else if (p[0] != '/')
         continue;
+      else if (p[1] == '\0')
+        last = 1;
 
       *p = '\0';
 
-      if (p[1] == '\0')
-        last = 1;
-
       if (first)
         {
           /*

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to