OSDN Git Service

Fix overflow in NinePatchImpl.
authorLeon Scroggins III <scroggo@google.com>
Thu, 21 May 2015 13:48:15 +0000 (09:48 -0400)
committerLeon Scroggins III <scroggo@google.com>
Thu, 21 May 2015 16:20:26 +0000 (12:20 -0400)
commit462dd010467fdf1ab0cb49e021a92d14f2163c8c
tree7216d95676b4bfaef4a3b9e66f47ec28efa8f3f1
parentd457c71eca2a0522793376a873dcdad318a2f798
Fix overflow in NinePatchImpl.

Cast numXDivs to a size_t before adding 1, so that if numXDivs is 255
it does not overflow. Move the calculation outside of alloca().

BUG:20727488
Change-Id: I2ecc9d650338acba7316554cb72195e02816b1f8
core/jni/android/graphics/NinePatchImpl.cpp