Skip to content

Commit

Permalink
fix(res): skip string if parsing failed (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed Jul 14, 2019
1 parent 0c2784b commit 8e8a2fa
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -11,7 +11,6 @@ protected String[] parseStringPool() throws IOException {
return parseStringPoolNoType();
}

@SuppressWarnings("unused")
protected String[] parseStringPoolNoType() throws IOException {
long start = is.getPos() - 2;
is.checkInt16(0x001c, "String pool header size not 0x001c");
Expand Down Expand Up @@ -56,6 +55,9 @@ protected String[] parseStringPoolNoType() throws IOException {
}

private static String extractString8(byte[] strArray, int offset) {
if (offset >= strArray.length) {
return "STRING_DECODE_ERROR";
}
int start = offset + skipStrLen8(strArray, offset);
int len = strArray[start++];
if (len == 0) {
Expand Down

0 comments on commit 8e8a2fa

Please sign in to comment.