summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2007-05-12 13:36:13 +0000
committerpav <pav@FreeBSD.org>2007-05-12 13:36:13 +0000
commit15acba9364cdb9cbe5a5d43c8c3db93293a9b992 (patch)
tree9be86ca4e15825626ea2127acb6bde3455ae1956 /usr.bin
parent36a46e2d9f71a808085f3c11a63a352048ee2c89 (diff)
downloadFreeBSD-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.c4
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)
OpenPOWER on IntegriCloud