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

Commit 1982a3df authored by chenmeijia's avatar chenmeijia Committed by Shunkai Yao
Browse files

Audio: fix the null pointer crash issue caused by accessing destroyed output



[cause]: When the output is closed in the offload or direct scenario,
the mOutput will be set to null and deleted in closeoutput. However, the
application side can still access the mOutput through AudioTrack's
getPlaybackRate and ultimately call Track::getPlaybackRateParameters.
Within this function, the mOutput is still accessed, leading to a
potential null pointer crash issue.
[solution]: add a null check condition for mOutput.

Flag: EXEMPT bugfix
Bug: 435277783
Test: atest CtsMediaAudioTestCases

Change-Id: Iab8c51a3a73c6be5a846cf85a31e7ee54c0a6e36
Signed-off-by: default avatarchenmeijia <chenmeijia@xiaomi.com>
parent ca015224
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