Skip to content

Commit 1456474

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "libbinder Parcel: Fix ubsan error in readData" into main
2 parents 1750d7f + b61a070 commit 1456474

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)