mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-01 14:03:30 +08:00
(mode_compile): Reject an invalid mode string that
starts with an octal digit. From Andreas Gruenbacher.
This commit is contained in:
parent
7aff553950
commit
a4667affc0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user