hasOverflowedNumEntriesBug
public static boolean hasOverflowedNumEntriesBug(@NonNull
java.nio.ByteBuffer data)
In older versions of Android, there is a bug where the .alloc file will allow the header field
"number of entries" overflow by 1. This results in the parser thinking there are 0 entries when
there are actually 65536 entries in the file (the field is encoded in an unsigned short).
This method, therefore, detects when the entries field has overflowed.
- Parameters:
data
- The data buffer holding the contents of the .alloc file.
- Returns:
- true if the bug affects the input file, false otherwise.