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

Open
sergeyfsv opened this Issue Apr 18, 2013 · 0 comments

Comments

Projects
None yet
1 participant

If only some elements have namespace (I've replaced <> with _ here, since the editor will not try to interpret them):
ttl>15_/ttl_
atom:link href="http://feeds.bbci.co.uk/news/rss.xml" rel="self" type="application/rss+xml"/
item
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