1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00

workaround misgenerated file: URIs c.f. #437385 daniel

* xmlIO.c: workaround misgenerated file: URIs c.f. #437385
daniel

svn path=/trunk/; revision=3630
This commit is contained in:
Daniel Veillard 2007-06-12 09:39:14 +00:00
parent d8ed1051fa
commit 5cdbbd2c75
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Tue Jun 12 11:37:55 CEST 2007 Daniel Veillard <daniel@veillard.com>
* xmlIO.c: workaround misgenerated file: URIs c.f. #437385
Tue Jun 12 11:22:47 CEST 2007 Daniel Veillard <daniel@veillard.com>
* relaxng.c: fixed bug #407436 a crash in a specific case of

11
xmlIO.c
View File

@ -844,17 +844,24 @@ xmlFileOpen_real (const char *filename) {
return((void *) fd);
}
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) {
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filename[17];
#else
path = &filename[16];
#endif
else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
} else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filename[8];
#else
path = &filename[7];
#endif
} else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) {
/* lots of generators seems to lazy to read RFC 1738 */
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filename[6];
#else
path = &filename[5];
#endif
} else
path = filename;