DO NOT MERGE: Use correct limit for port values

no upstream report yet, add it here when we have it
issue found & patch by nmehta@

Bug: 36555370
Change-Id: Ibf1efea554b95f514e23e939363d608021de4614
(cherry picked from commit b62884fb49fe92081e414966d9b5fe58250ae53c)

xmlParse3986Fragment(xmlURIPtr uri, const char **str)
{
 const char *cur;

 if (str == NULL)
 return (-1);

    cur = *str;

 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') ||
 (*cur == '[') || (*cur == ']') ||
 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
        NEXT(cur);
 if (uri != NULL) {
 if (uri->fragment != NULL)
            xmlFree(uri->fragment);
 if (uri->cleanup & 2)
	    uri->fragment = STRNDUP(*str, cur - *str);
 else
	    uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL);
 }
 *str = cur;
 return (0);
}

xmlParse3986Fragment(xmlURIPtr uri, const char **str)
{
 const char *cur;

 if (str == NULL)
 return (-1);

    cur = *str;

 while ((ISA_PCHAR(cur)) || (*cur == '/') || (*cur == '?') ||
 (*cur == '[') || (*cur == ']') ||
 ((uri != NULL) && (uri->cleanup & 1) && (IS_UNWISE(cur))))
        NEXT(cur);
 if (uri != NULL) {
 if (uri->fragment != NULL)
            xmlFree(uri->fragment);
 if (uri->cleanup & 2)
	    uri->fragment = STRNDUP(*str, cur - *str);
 else
	    uri->fragment = xmlURIUnescapeString(*str, cur - *str, NULL);
 }
 *str = cur;
 return (0);
}
