Fix security issue in DynamicRefTable::load.
A crafted resources arsc could cause libandroidfw to read data out of
bounds of the resources arsc. This change updates the logic to calculate
whether the ref table chunk is large enough to hold the number of
entries specified in the header.
Test: adb shell push ResTableTest data
Test: adb shell push poc.arsc data
Test: ./ResTableTest poc.arsc
(cherry picked from commit 8da1c38b69e947885fcec50cda46c5472ddb6746)
1 file changed