[xmlsec] About xmlParseInNodeContext() in libxml2.

StackWD(hotmail) StackWD at hotmail.com
Tue Sep 14 22:46:20 PDT 2004


Hi!

Let me tell you more details. I parse from a buffer, such as "<xsi:getsumReturn xsi:type="xsd:int">9</xsi:getsumReturn>". 
If the content of this node is a single character or a single digital or a serials of blank, then use xmlFreeNode() to free the node that via function xmlParseInNodeContext() , the result will be Segmentation fault. I debug into xmlFreeNode() and trace to DICT_FREE(cur->content), the cur->content is 9 and execute xmlFree((char *)(str)) result in the error of Segmentation fault. If the content of this node is NOT a single character or a single digital or a serials of blank, there will be right all.
I think whether I omit something or other? I need your help. Thx for lot.


>Try to run the program under gdb or valgrind and find out
>what causes the crash. BTW, did you call xmlSetTreeDoc?
>
>Aleksey
>
>
>
>StackWD(hotmail) wrote:
>
>> Hi!
>> 
>>     I have a question about function xmlParseInNodeContext() in libxml2.6.13. After I finished call it and get a parsed XML chain and add it to the doc, then there is an error Segmentation fault when I use xmlFreeDoc() to free the doc. I compiled in Red Hat 9 and need some advice from you. Thx!
>> _______________________________________________
>> xmlsec mailing list
>> xmlsec at aleksey.com
>> http://www.aleksey.com/mailman/listinfo/xmlsec


        StackWD(hotmail)
        StackWD at hotmail.com
          2004-09-15




More information about the xmlsec mailing list