[xml] Patch for Double Free in xmlNewEntityInputStream(parserInternals.c)



I am attaching a patch which takes care of a double free problem which happens due to the following statement in function xmlNewEntityInputStream:-


input->filename = (char *) entity->URI;


This leads to a double free because when the input stream is popped input->filename is freed, and when the dtd is freed, in xmlFreeEntity, entity->URI is freed which is the same as input->filename leading to a double free. I believe doing a xmlStrdup will take care of the problem, and that is what I have done in the patch.





Attachment: patch.txt
Description: Text document

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