Re: [xml] xmlRemoveID bug and a patch



Hi again.

internally." In the function's present form, this appears to always fail
due to a miscast pointer:

    xmlAttrPtr cur;
.
.
.
    cur = xmlHashLookup(table, ID);
    if (cur != attr) {
        xmlFree(ID);
        return(-1);
    }


The 'table' pointer, which refers to a document's 'ids' table has inserted
into it xmlIDPtrs by the xmlAddID function. Here, they are being cast into 
a xmlAttrPtr and compared with the xmlAttrPtr parameter 'attr'.

  Hum, right too, the ID table used to point directly to an xmlAttrPtr
and this is not the case anymore, bug #2


That little patch on valid.c that I sent was intended as a small fix for 
that one. However, I couldn't be sure that it would work for every 
instance (ie. I don't know how it should/would behave when using a 
streaming mode).

   No that's fine, thanks for the detailed program and explanations,
I will try to get those bugs fixed.

Very happy to help. :-D

-bill

----


William Robinson
baggins elitemail org
http://www.hobbiton.cjb.net/



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