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

Skip to content
Commit 75e93e7b authored by Ray Essick's avatar Ray Essick
Browse files

Avoid returning value on stack

AMediaFormat_getString() returnes a string not guaranteed to live beyond
the call. The underlying implementation of String8 seems to have made
this safe by using SharedBuffers, but that's luck of the implementatoon,
not a guarantee of the API.  We instead get our value by chasing through
where we just added it to the longer-lived vector.

Bug: 193904641
Test: atest libmedkandk_test
Test: atest android.mediav2.cts.MediaFormatUnitTest (master)
Change-Id: I7df35b7dbccf24c72cfd977a6b13d85aee8ae555
parent 1c3c35c0
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