mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix potential NULL deref
Backported from GH-18697.
This commit is contained in:
@@ -1872,7 +1872,7 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl
|
||||
} else {
|
||||
xmlNsPtr nsPtr = attr_find_ns(attr);
|
||||
|
||||
if (strncmp((char*)nsPtr->href, SCHEMA_NAMESPACE, sizeof(SCHEMA_NAMESPACE))) {
|
||||
if (nsPtr && strncmp((char*)nsPtr->href, SCHEMA_NAMESPACE, sizeof(SCHEMA_NAMESPACE))) {
|
||||
smart_str key2 = {0};
|
||||
sdlExtraAttributePtr ext;
|
||||
xmlNsPtr nsptr;
|
||||
|
||||
Reference in New Issue
Block a user