diff options
author | pav <pav@FreeBSD.org> | 2007-05-12 13:36:13 +0000 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2007-05-12 13:36:13 +0000 |
commit | 15acba9364cdb9cbe5a5d43c8c3db93293a9b992 (patch) | |
tree | 9be86ca4e15825626ea2127acb6bde3455ae1956 /usr.bin | |
parent | 36a46e2d9f71a808085f3c11a63a352048ee2c89 (diff) | |
download | FreeBSD-src-15acba9364cdb9cbe5a5d43c8c3db93293a9b992.zip FreeBSD-src-15acba9364cdb9cbe5a5d43c8c3db93293a9b992.tar.gz |
Fix crash when using 'du' capability: NULL return of strpbrk was not handled
PR: bin/108368
Reported by: Ivo Hazmuk <ivo@vutbr.cz>
Submitted by: rdivacky
MFC after: 2 weeks
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tip/tip/acu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tip/tip/acu.c b/usr.bin/tip/tip/acu.c index efd8ca1..7878698 100644 --- a/usr.bin/tip/tip/acu.c +++ b/usr.bin/tip/tip/acu.c @@ -100,10 +100,10 @@ con(void) if ((acu = acutype(AT)) == NOACU) return ("unknown ACU type"); if (*cp != '@') { - while (*cp) { + while (cp != NULL && *cp) { phnum = cp; cp = strpbrk(cp, ","); - if (*cp != '\0') + if (cp != NULL && *cp != '\0') *cp++ = '\0'; if (strlen(phnum) == 0) |