From: Andrey Volk Date: Mon, 19 Apr 2021 23:05:20 +0000 (+0300) Subject: [Core] scan-build: Argument with 'nonnull' attribute passed null in switch_xml_intern... X-Git-Tag: v1.10.7^2~244 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e30c62f8ec9245c25962f8ee171b48e572cdc679;p=thirdparty%2Ffreeswitch.git [Core] scan-build: Argument with 'nonnull' attribute passed null in switch_xml_internal_dtd() --- diff --git a/src/switch_xml.c b/src/switch_xml.c index 407a81767f..97ed4b563d 100644 --- a/src/switch_xml.c +++ b/src/switch_xml.c @@ -882,7 +882,7 @@ static short switch_xml_internal_dtd(switch_xml_root_t root, char *s, switch_siz continue; else *s = '\0'; /* null terminate tag name */ - for (i = 0; root->attr[i] && strcmp(n, root->attr[i][0]); i++); + for (i = 0; root->attr[i] && n && strcmp(n, root->attr[i][0]); i++); //while (*(n = ++s + strspn(s, SWITCH_XML_WS)) && *n != '>') { // gcc 4.4 you are a creep