Skip to content

Commit

Permalink
fix: skip unknown chunks in AXML (#3237)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBotPeaches committed Jul 30, 2023
1 parent 445da0e commit 6630888
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,10 @@ private void doNext() throws IOException {
}

if (chunkType < ARSCHeader.RES_XML_FIRST_CHUNK_TYPE || chunkType > ARSCHeader.RES_XML_LAST_CHUNK_TYPE) {
throw new IOException("Invalid chunk type (" + chunkType + ").");
int chunkSize = mIn.readInt();
mIn.skipBytes(chunkSize - 8);
LOGGER.warning(String.format("Unknown chunk type at: (0x%08x) skipping...", mCountIn.getCount()));
break;
}

// Fake START_DOCUMENT event.
Expand Down

0 comments on commit 6630888

Please sign in to comment.