Skip to content

Commit a346e69

Browse files
Treehugger Robotandroid-build-merge-worker-robot
authored andcommitted
Merge "libbinder Parcel: Fix ubsan error in readData" into main am: 1456474
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3300095 Change-Id: If10024d3d45d4f6c75de643e0bcf0b248c6b2415 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 parents 2d82af6 + 1456474 commit a346e69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/binder/include/binder/Parcel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ class Parcel {
12401240
if (__builtin_mul_overflow(size, sizeof(T), &dataLen)) {
12411241
return -EOVERFLOW;
12421242
}
1243-
auto data = reinterpret_cast<const T*>(readInplace(dataLen));
1243+
auto data = readInplace(dataLen);
12441244
if (data == nullptr) return BAD_VALUE;
12451245
// std::vector::insert and similar methods will require type-dependent
12461246
// byte alignment when inserting from a const iterator such as `data`,

0 commit comments

Comments
 (0)