The parse3339 JNI code doesn't properly do bounds checking on the input String.
These changes do some bounds checking to prevent a buffer underflow condition.
parse3339 should allow the fractional seconds to be optional and an arbitrary
length as specified in RFC 3339. This will scan through arbitrary precision
until it finds the timezone indicators.
Change-Id: Ie9d01d0b24163d893c58c747d37873c83b74e6c7
Currently parseUserPart uses the encoded authority to split the URI
into user and non-user parts, but the parseHost and parsePort uses
the decoded URI to split the URI into non-host, host, and port parts.
This gives unexpected results when %40 ('@') and %3a (':') is used
in a URI:
Uri test = Uri.parse("http://bob%40lee%3ajr@example.com:42/");
test.getUserInfo() => "bob@lee:jr"
test.getHost() => "lee:jr@example.com" (should be "example.com")
test.getPort() => -1 (should be 42)