diff options
author | Brian Somers <brian@FreeBSD.org> | 1999-12-20 20:30:02 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 1999-12-20 20:30:02 +0000 |
commit | c39aa54ec8245817e058c8493f4cf7236bf24a96 (patch) | |
tree | 79473fcd22a6de4338767dba560d8e734c07e96e /usr.sbin/ppp/defs.c | |
parent | dae8dd31bfc823983560043720b6b80b9e749290 (diff) | |
download | src-c39aa54ec8245817e058c8493f4cf7236bf24a96.tar.gz src-c39aa54ec8245817e058c8493f4cf7236bf24a96.zip |
Notice and warn about unterminated quoted strings in commands.
The entire command is ignored if the syntax is invalid...
Notes
Notes:
svn path=/head/; revision=54914
Diffstat (limited to 'usr.sbin/ppp/defs.c')
-rw-r--r-- | usr.sbin/ppp/defs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c index 4cb6de6cc7b6..6e7d5c90b256 100644 --- a/usr.sbin/ppp/defs.c +++ b/usr.sbin/ppp/defs.c @@ -276,6 +276,7 @@ findblank(char *p, int instring) return (p); p++; } + return NULL; } else { while (*p) { if (issep(*p)) @@ -311,7 +312,9 @@ MakeArgs(char *script, char **pvect, int maxargs) *pvect++ = script; nargs++; script = findblank(script, instring); - if (*script) + if (script == NULL) + return -1; + else if (*script) *script++ = '\0'; } } |