Commit ff292cd2 authored by Ivan Gavrilovic's avatar Ivan Gavrilovic
Browse files

Reuse the underlying byte array for ByteArray

Reuse the byte array for dex file output.

When calculating signature and checksum for a DEX
file, consider the size of the DEX file, instead of
the array. An array bigger than the file can be
allocated, and this would lead to wrong signature
and checksum calculation.

Because we reuse the output array
between seprate dx invocations, we
must write zeros to array. Otherwise, we might
end up picking up the output from
previous invocation.

The BaseDumper now tracks the number of read
bytes instead of the position.

Test: existing
Change-Id: I17126cfc02330bb459ae48be781e83ea997e4137
parent 79c77365
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment