Commit 9d674e9a authored by Andy McFadden's avatar Andy McFadden
Browse files

Fix DexFile cookie check.

We use a "cookie" rather than just accepting a raw pointer so that the
VM doesn't crash if something weird gets passed in.  Unfortunately the
cookie verify function was dereferencing the cookie to compute a value
for the hash table lookup, defeating the purpose.  Since we don't deal
with opening the same DEX file in a constructive way, we can just take
the low part of the pointer itself and use that as the hash.  (Hashing
isn't really necessary given the number of DEX files we expect to have
open; mostly it's just a convenient synchronized data structure.)

Bug 3238298

Change-Id: I1a545d4154b58159acdc21809b55b098c1419644
parent 003a38e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment