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

Skip to content
Commit 184f274e authored by Tim Van Patten's avatar Tim Van Patten
Browse files

getPlatformDisplayAngle: Fix std::vector scope error

The std::vector<const char*> variables were scoped to only within the
conditional blocks for graphicsenv_flags::feature_overrides(). However,
pointers to those vectors were added to the std::vector<EGLAttrib> attrs
which is passed to eglGetPlatformDisplay(), leading to a use-after-free
and ANGLE crashing due to a SIGSEGV.

Move the declarations of enabled/disabled std::vectors next to attrs so
their lifetimes match. Also, add a comment about why they are declared
there, so they aren't erroneously moved back inside the conditional
blocks where they are used in the future.

Bug: 372694741
Test: CQ, Manual verification
Flag: com.android.graphics.graphicsenv.flags.feature_overrides
Change-Id: I85a361819e082bc546933e2839e3741a6b4c4ffd
parent 03ec059e
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