]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] scan-build: Argument with 'nonnull' attribute passed null in switch_xml_intern...
authorAndrey Volk <andywolk@gmail.com>
Mon, 19 Apr 2021 23:05:20 +0000 (02:05 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:30:17 +0000 (20:30 +0300)
src/switch_xml.c

index 407a81767f95b4547df7a15417cc96be1b460220..97ed4b563de90350c659fbcd79d5c8ef85bb8343 100644 (file)
@@ -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