graetzer / GDataXML-HTML

HTML and XML parser for iOS and OSX, supports XPath
Apache License 2.0
289 stars 121 forks source link

Fix unsafe cast of an xmlDocPtr into a xmlNodePtr. #8

Closed master-nevi closed 10 years ago

master-nevi commented 10 years ago

On 64-bit systems this has proven in my project to consistently lead to bad access memory crashes when an attempt is made to dereference a struct member which xmlDocPtr and xmlNodePtr don't hold in common. Specifically the 'namespace' member is attempted to be accessed inside [GDataXMLNode nodesForXPath:namespaces:error:] which a xmlDocPtr doesn't possess.