diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2006-03-09 14:13:55 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2006-03-09 14:13:55 +0000 |
commit | 30e7607b7a346695691cd819361b3c11e8d11d00 (patch) | |
tree | 47ea2b445c24e5d60abce2db9b0f2e789639d600 /uri.c | |
parent | 53cd4a1b4ef8be397548470fd0c3075c8d67c25c (diff) | |
download | libxml2-30e7607b7a346695691cd819361b3c11e8d11d00.tar.gz |
a bunch of small cleanups based on coverity reports. Daniel
* HTMLparser.c parser.c parserInternals.c pattern.c uri.c: a bunch
of small cleanups based on coverity reports.
Daniel
Diffstat (limited to 'uri.c')
-rw-r--r-- | uri.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1078,11 +1078,13 @@ xmlURIEscape(const xmlChar * str) static int xmlParseURIFragment(xmlURIPtr uri, const char **str) { - const char *cur = *str; - + const char *cur; + if (str == NULL) return (-1); + cur = *str; + while (IS_URIC(cur) || IS_UNWISE(cur)) NEXT(cur); if (uri != NULL) { @@ -1111,11 +1113,13 @@ xmlParseURIFragment(xmlURIPtr uri, const char **str) static int xmlParseURIQuery(xmlURIPtr uri, const char **str) { - const char *cur = *str; + const char *cur; if (str == NULL) return (-1); + cur = *str; + while ((IS_URIC(cur)) || ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur)))) NEXT(cur); |