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
This commit is contained in:
parent
36a46e2d9f
commit
15acba9364
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user