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-w32-4e61db228496a1ef1b81773d41116ebb659cebe3.tar.gz
busybox-w32-4e61db228496a1ef1b81773d41116ebb659cebe3.tar.bz2
busybox-w32-4e61db228496a1ef1b81773d41116ebb659cebe3.zip
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)
743 char type; 743 char type;
744 char c; 744 char c;
745 745
746 if (s==NULL)
747 return (FALSE);
748
746 do { 749 do {
747 for (;;) { 750 for (;;) {
748 switch (c = *s++) { 751 switch (c = *s++) {