Crash in (RXMLElement *)child:(NSString *)tag inNamespace:(NSString *)ns #38

sergeyfsv opened this Issue Apr 18, 2013 · 0 comments


None yet
1 participant

If only some elements have namespace (I've replaced <> with _ here, since the editor will not try to interpret them):
atom:link href="" rel="self" type="application/rss+xml"/
title_Deadly Texas blast 'like tornado'/title_
and you are trying to use child:@"link" inNamespace:@"atom"

you will get crash at this piece of the code:

            if (cur->type == XML_ELEMENT_NODE && !xmlStrcmp(cur->name, tagC) && !xmlStrcmp(cur->ns->href, namespaceC)) {

Because cur->ns for the most elements from the example above will be nil, and dereferencing it is an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment