Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e33238ec authored by Andrei Homescu's avatar Andrei Homescu
Browse files

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
parent 5ad71b55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment