mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 06:55:44 +00:00
[LIBXML2] Update to version 2.9.10. CORE-16952
This commit is contained in:
parent
b82bf8ce16
commit
f22fa382fe
65 changed files with 2245 additions and 2056 deletions
20
sdk/lib/3rdparty/libxml2/uri.c
vendored
20
sdk/lib/3rdparty/libxml2/uri.c
vendored
|
@ -22,7 +22,7 @@
|
|||
* MAX_URI_LENGTH:
|
||||
*
|
||||
* The definition of the URI regexp in the above RFC has no size limit
|
||||
* In practice they are usually relativey short except for the
|
||||
* In practice they are usually relatively short except for the
|
||||
* data URI scheme as defined in RFC 2397. Even for data URI the usual
|
||||
* maximum size before hitting random practical limits is around 64 KB
|
||||
* and 4KB is usually a maximum admitted limit for proper operations.
|
||||
|
@ -325,16 +325,18 @@ static int
|
|||
xmlParse3986Port(xmlURIPtr uri, const char **str)
|
||||
{
|
||||
const char *cur = *str;
|
||||
unsigned port = 0; /* unsigned for defined overflow behavior */
|
||||
int port = 0;
|
||||
|
||||
if (ISA_DIGIT(cur)) {
|
||||
while (ISA_DIGIT(cur)) {
|
||||
port = port * 10 + (*cur - '0');
|
||||
if (port > 99999999)
|
||||
port = 99999999;
|
||||
|
||||
cur++;
|
||||
}
|
||||
if (uri != NULL)
|
||||
uri->port = port & INT_MAX; /* port value modulo INT_MAX+1 */
|
||||
uri->port = port;
|
||||
*str = cur;
|
||||
return(0);
|
||||
}
|
||||
|
@ -436,7 +438,7 @@ xmlParse3986Host(xmlURIPtr uri, const char **str)
|
|||
|
||||
host = cur;
|
||||
/*
|
||||
* IPv6 and future adressing scheme are enclosed between brackets
|
||||
* IPv6 and future addressing scheme are enclosed between brackets
|
||||
*/
|
||||
if (*cur == '[') {
|
||||
cur++;
|
||||
|
@ -1456,7 +1458,7 @@ xmlNormalizeURIPath(char *path) {
|
|||
goto done_cd;
|
||||
(out++)[0] = (cur++)[0];
|
||||
}
|
||||
/* nomalize // */
|
||||
/* normalize // */
|
||||
while ((cur[0] == '/') && (cur[1] == '/'))
|
||||
cur++;
|
||||
|
||||
|
@ -2150,7 +2152,7 @@ done:
|
|||
* http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif
|
||||
*
|
||||
*
|
||||
* Note: if the URI reference is really wierd or complicated, it may be
|
||||
* Note: if the URI reference is really weird or complicated, it may be
|
||||
* worthwhile to first convert it into a "nice" one by calling
|
||||
* xmlBuildURI (using 'base') before calling this routine,
|
||||
* since this routine (for reasonable efficiency) assumes URI has
|
||||
|
@ -2461,7 +2463,7 @@ path_processing:
|
|||
/* allocate space for leading '/' + path + string terminator */
|
||||
uri->path = xmlMallocAtomic(len + 2);
|
||||
if (uri->path == NULL) {
|
||||
xmlFreeURI(uri); /* Guard agains 'out of memory' */
|
||||
xmlFreeURI(uri); /* Guard against 'out of memory' */
|
||||
return(NULL);
|
||||
}
|
||||
/* Put in leading '/' plus path */
|
||||
|
@ -2476,7 +2478,7 @@ path_processing:
|
|||
}
|
||||
p = uri->path;
|
||||
}
|
||||
/* Now change all occurences of '\' to '/' */
|
||||
/* Now change all occurrences of '\' to '/' */
|
||||
while (*p != '\0') {
|
||||
if (*p == '\\')
|
||||
*p = '/';
|
||||
|
@ -2526,7 +2528,7 @@ xmlPathToURI(const xmlChar *path)
|
|||
return(NULL);
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
/* xmlCanonicPath can return an URI on Windows (is that the intended behaviour?)
|
||||
If 'cal' is a valid URI allready then we are done here, as continuing would make
|
||||
If 'cal' is a valid URI already then we are done here, as continuing would make
|
||||
it invalid. */
|
||||
if ((uri = xmlParseURI((const char *) cal)) != NULL) {
|
||||
xmlFreeURI(uri);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue