You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/php-src/Zend/zend_smart_str.h:177:41: runtime error: null pointer passed as argument 1, which is declared to never be null
/usr/include/string.h:408:33: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /php-src/Zend/zend_smart_str.h:177:41
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered:
The more I look at this the bigger my headache becomes.
There's many things wrong in schema_attribute:
attr_is_equal_ex makes no sense, it seems like it tries to check what for an attribute name and its namespace. However, there is confusion between attribute namespace and element namespace. An attribute without a prefix is always in no namespace. Yet if this happens the function looks at the parent namespace :/ Reading https://www.w3.org/TR/xmlschema-1/#cAttribute_Declarations makes me no wiser because (as is typical with w3 specs) this document is very open to interpretation.
Because of the previous issue, you can execute newAttr->name = estrdup((char*)attr->children->content); multiple times, leading to a memory leak.
schema_attribute uses get_attribute for the name and ref attributes, which don't take into account the namespace (first match wins!). However, then for actual storing that data it does take into account the namespace (well kinda, see first point).
Why do we execute schema_attribute even in the first place? The complexType element is in the wrong namespace, or am I misreading the WSDL? Yet, apparently this WSDL file came out of a generator...
I already learned that you have to be ... tolerant when it comes to SOAP stuff due to different interpretations between different implementers.
So it seems to me that we should drop attr_is_equal_ex and edit schema_attribute to ignore the namespace, or take into account a preferred namespace for the attribute.
Description
The following code:
Resulted in this output:
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04
The text was updated successfully, but these errors were encountered: