X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmodechange.c;h=52c5debca3a607c191990bca3db086885c4d0383;hb=f84215faa43d2933011459dd42ba518df63e34c4;hp=6ab9cb6fdd5a539a97f91d51a130e19e51204dfa;hpb=222b0486b7db1b09293e05512873d633440efcb3;p=gnulib.git diff --git a/lib/modechange.c b/lib/modechange.c index 6ab9cb6fd..52c5debca 100644 --- a/lib/modechange.c +++ b/lib/modechange.c @@ -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