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

Skip to content
Commit 01f5121a authored by Enrico Granata's avatar Enrico Granata
Browse files

Don't set hidl_string's buffer to nullptr

Sending a null hidl_string from native code to Java is currently not
a supported operation and will cause a crash. As originally written,
shallowCopy would set a hidl_string to null as soon as a non-empty
stringValue was followed by an empty stringValue. Since freeze frames
come with a string value (the DTC) and live frames doesn't, this would
cause all diagnostics to crash while reading VehiclePropValue from parcel
immediately after dispatching a freeze frame. Fix by resetting empty strings
to a global non-null but zero length buffer.

Bug: 37435530
Test: diagnostic_injector.py
Change-Id: Ie79174dd7ab3d266f1e3addefa5ba9e2128ea9f8
parent faaa4819
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment