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)
diff --git a/uri.c b/uri.c
index 2bd5720..b32ef10 100644
--- a/uri.c
+++ b/uri.c
@@ -12,6 +12,7 @@
 #include "libxml.h"
 
 #include <string.h>
+#include <limits.h>
 
 #include <libxml/xmlmemory.h>
 #include <libxml/uri.h>
@@ -334,7 +335,7 @@
 	    cur++;
 	}
 	if (uri != NULL)
-	    uri->port = port & INT_MAX; /* port value modulo INT_MAX+1 */
+	    uri->port = port & USHRT_MAX; /* port value modulo INT_MAX+1 */
 	*str = cur;
 	return(0);
     }