summaryrefslogtreecommitdiff
path: root/libs/binder/RpcState.cpp
diff options
context:
space:
mode:
author Andrei Homescu <ahomescu@google.com> 2022-03-29 22:50:00 +0000
committer Andrei Homescu <ahomescu@google.com> 2022-03-30 21:56:15 +0000
commite33238ec4dbf2ccc05dd6889ce959b90f9a0418f (patch)
tree7c2467696585d87c78c2938f9726c589c4fd7575 /libs/binder/RpcState.cpp
parent5ad71b5582147f3a26a1986239e1fcd115b81b9a (diff)
libbinder: Support unaligned reads/writes in Parcel.cpp
Parcel words have a 4 byte alignment. Calls to readAligned and writeAligned with larger types, e.g., binder_uintptr_t from readPointer, would crash with an UBSan violation. This fixes those crashes by using memcpy() to copy unaligned values and require that all such values are trivially copyable. Bug: 2002930 Test: atest binderRpcTest Change-Id: Id9430ca85a7d9ae8e9df7328ef7f64fa432233a6
Diffstat (limited to 'libs/binder/RpcState.cpp')
0 files changed, 0 insertions, 0 deletions