Skip to content
Commit 99c549db authored by Tao Bao's avatar Tao Bao
Browse files

Fix the double free in verify_package_compatibility().

"""
void* cookie;
std::unique_ptr<void, decltype(&EndIteration)> guard(cookie, EndIteration);
  ...
EndIteration(cookie);
"""

The above pattern is buggy that frees 'cookie' twice.

Bug: 37413730
Test: Build new recovery and adb sideload a previously crashed package
      that contains 'compatibility.zip'.
Change-Id: I183c33827fb28a438ebaedda446e84cabe7cb92d
(cherry picked from commit f9782789)
parent 7fdcb19e
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