Skip to content
Commit ec419e0b authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Make Bitmap_createFromParcel check the color count.

When reading from the parcel, if the number of colors is invalid, early
exit.

Add two more checks: setInfo must return true, and Parcel::readInplace
must return non-NULL. The former ensures that the previously read values
(width, height, etc) were valid, and the latter checks that the Parcel
had enough data even if the number of colors was reasonable.

Also use an auto-deleter to handle deletion of the SkBitmap.

BUG=19666945

Change-Id: Icbd562d6d1f131a723724883fd31822d337cf5a6
parent 4771577a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment