commit | 5d649dcbf9530245f9c6cb31dda8f39abcaebf12 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Thu Oct 10 04:34:48 2024 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Oct 10 04:34:48 2024 +0000 |
tree | 1ec27a716ecd643ebdc562207cf8c6c7419cc47f | |
parent | 5e89c16d60b0e402b4840372dbc54acb40c09277 [diff] | |
parent | a346e69406031657ccacbd580cdb36d43998e395 [diff] |
Merge "libbinder Parcel: Fix ubsan error in readData" into main am: 1456474eb4 am: a346e69406 Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3300095 Change-Id: I6e1f739dff13309eeaab7ac6c950b827c7148aeb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/binder/include/binder/Parcel.h b/libs/binder/include/binder/Parcel.h index 50a58e9..ceab20a 100644 --- a/libs/binder/include/binder/Parcel.h +++ b/libs/binder/include/binder/Parcel.h
@@ -1239,7 +1239,7 @@ if (__builtin_mul_overflow(size, sizeof(T), &dataLen)) { return -EOVERFLOW; } - auto data = reinterpret_cast<const T*>(readInplace(dataLen)); + auto data = readInplace(dataLen); if (data == nullptr) return BAD_VALUE; // std::vector::insert and similar methods will require type-dependent // byte alignment when inserting from a const iterator such as `data`,