8000 Fix potential NULL deref · php/php-src@dd856d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd856d5

Browse files
committed
Fix potential NULL deref
Backported from GH-18697.
1 parent 40422e9 commit dd856d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/soap/php_schema.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
18721872
} else {
18731873
xmlNsPtr nsPtr = attr_find_ns(attr);
18741874

1875-
if (strncmp((char*)nsPtr->href, SCHEMA_NAMESPACE, sizeof(SCHEMA_NAMESPACE))) {
1875+
if (nsPtr && strncmp((char*)nsPtr->href, SCHEMA_NAMESPACE, sizeof(SCHEMA_NAMESPACE))) {
18761876
smart_str key2 = {0};
18771877
sdlExtraAttributePtr ext;
18781878
xmlNsPtr nsptr;

0 commit comments

Comments
 (0)
0