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

Skip to content
Commit a57e4637 authored by Stephen Hines's avatar Stephen Hines
Browse files

Fix an invalid memory access detected by ASan stack-use-after-return.

The latest ASan from our compiler update (http://b/241011085) enables
the stack-use-after-return check by default. This caught an issue in a
Bluetooth test, where the test was initialized with an empty set of
presets that are accidentally then iterated over starting with a direct
access of the first nonexistent entry (lines 271-276 of
has_client_test.cc). This fix switches the tests to use the default
nullopt instead of an empty set, which then allows for a default set to
be created before access.

Bug: http://b/241963581
Test: atest --host bluetooth_has_test64
Change-Id: If500815340051f53890e4d751d9ad528bc1be2a2
parent 3b083f8d
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