aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-09-01 00:06:17 +0000
committerEric Andersen <andersen@codepoet.org>2000-09-01 00:06:17 +0000
commit4e61db228496a1ef1b81773d41116ebb659cebe3 (patch)
tree245767253f08515a1a348fbe833ce5364ad13a0a
parentad3d90f91e1136ec6642d1e94044b1e87f2bf2f9 (diff)
downloadbusybox-4e61db228496a1ef1b81773d41116ebb659cebe3.tar.gz
Add an extra sanity check in parse_mode
-Erik
-rw-r--r--utility.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/utility.c b/utility.c
index 911d84eaf..c8bd5737a 100644
--- a/utility.c
+++ b/utility.c
@@ -743,6 +743,9 @@ extern int parse_mode(const char *s, mode_t * theMode)
char type;
char c;
+ if (s==NULL)
+ return (FALSE);
+
do {
for (;;) {
switch (c = *s++) {