Patch from vodz:
[oweals/busybox.git] / libbb / parse_mode.c
index 49573dfbb8ef31526a100af51ec724501b864d75..7132c76ef9ba44ae186b2f4b3c7f0071664bd435 100644 (file)
@@ -65,7 +65,7 @@ extern int bb_parse_mode(const char *s, mode_t *current_mode)
                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;