extern int bb_parse_mode(const char *s, mode_t *current_mode)
{
- static const mode_t who_mask[] = {
+ static const mode_t who_mask[] = {
S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */
S_ISUID | S_IRWXU, /* u */
S_ISGID | S_IRWXG, /* g */
char *e;
tmp = strtol(s, &e, 8);
- if (*e || (tmp > 0xffffU)) { /* Check range and trailing chars. */
+ if (*e || (tmp > 07777U)) { /* Check range and trailing chars. */
return 0;
}
*current_mode = tmp;