OSDN Git Service

Time.parse3339 range checking and proper 'sec-frac' skip
authorKenny Root <kenny@the-b.org>
Mon, 20 Jul 2009 06:45:48 +0000 (01:45 -0500)
committerKenny Root <kenny@the-b.org>
Mon, 16 Nov 2009 20:30:24 +0000 (14:30 -0600)
commit6c2d4029f1fecb51e0b002e652fd18e18d059fe0
tree03bf1595598350efd56159d027fe1d416655e714
parent05ffc255c0232b5d4663b6281b1c6c914ed3b585
Time.parse3339 range checking and proper 'sec-frac' skip

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
core/jni/android_text_format_Time.cpp
tests/AndroidTests/src/com/android/unit_tests/TimeTest.java