mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
trying to fix #114277 about when file remapping and escaping should really
* parser.c xmlIO.c: trying to fix #114277 about when file remapping and escaping should really be attempted. Daniel
This commit is contained in:
11
parser.c
11
parser.c
@ -10558,7 +10558,6 @@ xmlCreateFileParserCtxt(const char *filename)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt;
|
||||
xmlParserInputPtr inputStream;
|
||||
char *canonicFilename;
|
||||
char *directory = NULL;
|
||||
|
||||
ctxt = xmlNewParserCtxt();
|
||||
@ -10569,16 +10568,8 @@ xmlCreateFileParserCtxt(const char *filename)
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
canonicFilename = (char *) xmlCanonicPath((const xmlChar *) filename);
|
||||
if (canonicFilename == NULL) {
|
||||
if (xmlDefaultSAXHandler.error != NULL) {
|
||||
xmlDefaultSAXHandler.error(NULL, "out of memory\n");
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
inputStream = xmlLoadExternalEntity(canonicFilename, NULL, ctxt);
|
||||
xmlFree(canonicFilename);
|
||||
inputStream = xmlLoadExternalEntity(filename, NULL, ctxt);
|
||||
if (inputStream == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
|
Reference in New Issue
Block a user