From 611b730bade54a0a79dbcc3087d9393086e6dbdf Mon Sep 17 00:00:00 2001 From: Devin Moore Date: Wed, 12 Mar 2025 19:35:53 +0000 Subject: Check mDataPos to see if the Parcel needs to grow Flag: EXEMPT bug fix Ignore-AOSP-First: security fix Test: atest binderUnitTest Bug: 399155883 Change-Id: I38b755ca3381cfca3300292873f763823fbf169b --- libs/binder/Parcel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/binder/Parcel.cpp') diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 777c22a63e..2c37624304 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -542,7 +542,7 @@ status_t Parcel::appendFrom(const Parcel* parcel, size_t offset, size_t len) { return BAD_VALUE; } - if ((mDataSize+len) > mDataCapacity) { + if ((mDataPos + len) > mDataCapacity) { // grow data err = growData(len); if (err != NO_ERROR) { -- cgit v1.2.3-59-g8ed1b