1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

after and exchange with James Clark it appeared I had bug in URI parsing

* test/xsdtest/xsdtest.xml uri.c: after and exchange with James
  Clark it appeared I had bug in URI parsing code ...
* relaxng.c include/libxml/relaxng.h: completely revamped error
  reporting to not loose message from optional parts.
* xmllint.c: added timing for RNG validation steps
* result/relaxng/*: updated the result, all error messages changed
Daniel
This commit is contained in:
Daniel Veillard
2003-03-07 18:32:59 +00:00
parent edfd588e95
commit 42f12e99d1
35 changed files with 931 additions and 229 deletions

6
uri.c
View File

@ -1463,8 +1463,10 @@ xmlParseURIAuthority(xmlURIPtr uri, const char **str) {
* try first to parse it as a server string.
*/
ret = xmlParseURIServer(uri, str);
if (ret == 0)
if ((ret == 0) && (*str != NULL) &&
((**str == 0) || (**str == '/') || (**str == '?')))
return(0);
*str = cur;
/*
* failed, fallback to reg_name
@ -2020,7 +2022,7 @@ xmlCanonicPath(const xmlChar *path)
p++;
}
#else
uri->path = (char *) xmlStrdup((const char *) path);
uri->path = (char *) xmlStrdup((const xmlChar *) path);
#endif
ret = xmlSaveUri(uri);