fix --mode parsing by checking the proper function parameter
This commit is contained in:
parent
0b815cc67f
commit
357d3ecf84
@ -109,7 +109,7 @@ static int do_check (char *path, uid_t uid, gid_t gid, mode_t mode, int file)
|
|||||||
static int parse_mode (mode_t *mode, char *text)
|
static int parse_mode (mode_t *mode, char *text)
|
||||||
{
|
{
|
||||||
/* Check for a numeric mode */
|
/* Check for a numeric mode */
|
||||||
if ((*mode - '0') < 8) {
|
if ((*text - '0') < 8) {
|
||||||
char *p;
|
char *p;
|
||||||
unsigned long l = strtoul (text, &p, 8);
|
unsigned long l = strtoul (text, &p, 8);
|
||||||
if (*p || l > 07777U) {
|
if (*p || l > 07777U) {
|
||||||
|
Loading…
Reference in New Issue
Block a user