X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmodechange.c;h=52c5debca3a607c191990bca3db086885c4d0383;hb=718b0598a7e9f5e9bdf3efc7e91e69a78e465327;hp=a2697f67ff0243d0ee1a2335caa5aa10bef8334d;hpb=267a39bafd249d7eb9c37df06dc6defcf41cb343;p=gnulib.git diff --git a/lib/modechange.c b/lib/modechange.c index a2697f67f..52c5debca 100644 --- a/lib/modechange.c +++ b/lib/modechange.c @@ -26,7 +26,7 @@ changing the mode of many files, this probably results in a performance gain. */ -#if HAVE_CONFIG_H +#ifdef HAVE_CONFIG_H # include #endif @@ -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