Re: [xml] xmlTextReaderClose causing segfault



From: "Daniel Veillard" <veillard redhat com>
  yes, that's a bug. xmlTextReaderClose() should set up
reader->ctxt to NULL after calling xmlFreeParserCtxt(), definitely.
I fixed my CVs checkount, I will commit this later.
Now the ways to turn around the problem is to allocate the context
yourself and use xmlReaderNewxxx instead of xmlReaderForxxx
that way libxml2 should not free the parser contect on Close,
but you will have to do it, that should work.

Unfortunately I cant use those functions yet as it needs to run under libxml
2.5.10+, so just going to skip using xmlTextReaderClose() for now until
2.6.x becomes the base version.
Also, you might also want to add that to the same block of code in
xmlTextReaderGetRemainder() as it has the same issue.

Thanks,

Rob





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