bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

modechange fix imported from coreutils


From: Paul Eggert
Subject: modechange fix imported from coreutils
Date: Mon, 09 Jan 2006 15:32:17 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed this:

2006-01-09  Jim Meyering  <address@hidden>

        Sync from coreutils.

        * lib/modechange.c (mode_compile): Reject an invalid mode string
        that starts with an octal digit.  From Andreas Gruenbacher.

Index: lib/modechange.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/modechange.c,v
retrieving revision 1.31
diff -p -u -r1.31 modechange.c
--- lib/modechange.c    19 Sep 2005 17:28:14 -0000      1.31
+++ lib/modechange.c    9 Jan 2006 23:02:07 -0000
@@ -124,6 +124,9 @@ mode_compile (char const *mode_string)
        }
       while ('0' <= *mode_string && *mode_string < '8');
 
+      if (*mode_string)
+       return NULL;
+
       /* Help the compiler optimize the usual case where mode_t uses
         the traditional octal representation.  */
       mode = ((S_ISUID == SUID && S_ISGID == SGID && S_ISVTX == SVTX




reply via email to

[Prev in Thread] Current Thread [Next in Thread]