OSDN Git Service

Don't pad before calling writeInPlace().
authorMartijn Coenen <maco@google.com>
Wed, 4 Apr 2018 09:46:56 +0000 (11:46 +0200)
committerMartijn Coenen <maco@google.com>
Wed, 4 Apr 2018 09:51:30 +0000 (09:51 +0000)
commitf8542381b72a7bb2452a5278a00ca8c34edbf8a0
treee048f1bd620897fd7a8d98642a945afd5137abd1
parentfa851800cf97d1a3d30a7a147877005dc48721ff
Don't pad before calling writeInPlace().

writeInplace() itself already pads securely, by masking off
the padded bytes. If the padding is done before calling
writeInplace(), no mask is applied, and heap data can leak.

Bug: 77237570
Test: builds
Change-Id: Ide27a0002d4ed4196530430760245b971f6a3f44
libs/binder/Parcel.cpp