From 6ee029dd30808a05f842c46672261a27dbb107da Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Fri, 22 May 2015 09:07:15 -0500 Subject: [PATCH] Read extra data if over known bytes If the ResConfig had a size over KNOWN_CONFIG_BYTES then the remaining bytes would be read twice, thus breaking the next config. Fixes #924 --- .../src/main/java/brut/androlib/res/decoder/ARSCDecoder.java | 1 + 1 file changed, 1 insertion(+) diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java index 6ed58cfd..447875bb 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java @@ -323,6 +323,7 @@ public class ARSCDecoder { int exceedingSize = size - KNOWN_CONFIG_BYTES; if (exceedingSize > 0) { byte[] buf = new byte[exceedingSize]; + read += exceedingSize; mIn.readFully(buf); BigInteger exceedingBI = new BigInteger(1, buf);