OSDN Git Service

Verify number of Map entries written to Parcel
authorMichael Wachenschwanz <mwachens@google.com>
Sat, 25 Aug 2018 04:50:35 +0000 (21:50 -0700)
committerRohit Yengisetty <rngy@google.com>
Fri, 28 Sep 2018 22:08:03 +0000 (15:08 -0700)
commita517294d0dd68441bd8883a11c4b9de23c1055cb
treec5bf188a91339d94f9e955972eac4057ae14643c
parent0137b7e3d00b30e4d9b48a779d2ed8e69f9ac5e1
Verify number of Map entries written to Parcel

Make sure the number of entries written by Parcel#writeMapInternal
matches the size written. If a mismatch were allowed, an exploitable
scenario could occur where the data read from the Parcel would not
match the data written.

Fixes: 112859604
Test: cts-tradefed run cts -m CtsOsTestCases -t android.os.cts.ParcelTest

Change-Id: I325d08a8b66b6e80fe76501359c41b6656848607
Merged-In: I325d08a8b66b6e80fe76501359c41b6656848607
(cherry picked from commit 057a01d1f38e9b46d3faa4059fdd7c8717681ea0)
core/java/android/os/Parcel.java