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

Skip to content
Commit c9637682 authored by Girish's avatar Girish
Browse files

resourcemanagerservice: make a copy of client config

The cases when the codec is release without stopping, the
resource manager calls notifyClientStopped from notifyClientReleased.
But while doing so, it passes a reference from mClientConfigMap map’s
entry.
This could potentially cause use-after-free situation as
notifyClientStopped removes the entry from the map and uses it
later.
To fix this, make a copy of ClientConfigParcel from the mClientConfigMap
map’s entry. Also, update the timestamp of codec::stop

Bug: 274883119
Test: atest cts/tests/media/misc/src/android/media/misc/cts/ResourceManagerTest.java
      /data/nativetest64/ResourceManagerService_test/ResourceManagerService_test
      /data/nativetest64/ResourceObserverService_test/ResourceObserverService_test
Merged-In: I00cb69a276b80e8ef7a196f62d9816541878b222
Change-Id: I00cb69a276b80e8ef7a196f62d9816541878b222
parent 1f002cf0
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