[xml] xmlTextReaderPrefix goes boom



Hello,

When feeding the xmlTextReaderPrefix in xmlreader.c an xml text with an 
element that does not have a namespace the following code goes boom:

    if ((node->ns != NULL) || (node->ns->prefix != NULL))
        return(xmlStrdup(node->ns->prefix));

I do believe that should read :

    if ((node->ns != NULL) && (node->ns->prefix != NULL))
        return(xmlStrdup(node->ns->prefix));

which will ensure world peace. 

Cheers,
-- 
Merijn Broeren | We take risks, we know we take them. Therefore, when things
Software Geek  | come out against us, we have no cause for complaint.
               | - Scott, last journal entry, march 1912



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]