OSDN Git Service

Benign unsigned integer overflow in Parcel
authorDan Austin <danielaustin@google.com>
Thu, 10 Sep 2015 20:46:02 +0000 (13:46 -0700)
committerAlex Deymo <deymo@google.com>
Wed, 18 Nov 2015 01:49:15 +0000 (17:49 -0800)
commitf28b295df90da3b9610cc5d6100039e54d95f49a
tree43cd37d1dc03e898ecdd73408ea3c831fc09e969
parent2ab8014d78fe89b022cd8f69024112780fecdd30
Benign unsigned integer overflow in Parcel

The realloc case in continueWrite did not update the
gParcelGlobalAllocCount value when an allocation occurred.

In addition, there are conditions that could cause the
gParcelGlobalAllocCount value to be decremented below 0, resulting
in a benign unsigned integer overflow that can cause corrupted values
to be returned through system profiling mechanisms.

BUG: 23972600

(cherry picked from commit 48fd7b457bb0657253d6012e787f50498b32ae42)

Change-Id: I1ad2ac02ab370402481550f6ab8f21fce42455e4
libs/binder/Parcel.cpp