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)

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

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

    cur = *str;
 if (!ISA_ALPHA(cur))
 return(2);
    cur++;
 while (ISA_ALPHA(cur) || ISA_DIGIT(cur) ||
 (*cur == '+') || (*cur == '-') || (*cur == '.')) cur++;
 if (uri != NULL) {
 if (uri->scheme != NULL) xmlFree(uri->scheme);
	uri->scheme = STRNDUP(*str, cur - *str);
 }
 *str = cur;
 return(0);
}

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

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

    cur = *str;
 if (!ISA_ALPHA(cur))
 return(2);
    cur++;
 while (ISA_ALPHA(cur) || ISA_DIGIT(cur) ||
 (*cur == '+') || (*cur == '-') || (*cur == '.')) cur++;
 if (uri != NULL) {
 if (uri->scheme != NULL) xmlFree(uri->scheme);
	uri->scheme = STRNDUP(*str, cur - *str);
 }
 *str = cur;
 return(0);
}
