mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-22 01:37:34 +01:00
correctly handles abused length strings - jtmuhone
This commit is contained in:
parent
52767a2a94
commit
1d745ac0ad
3
CHANGES
3
CHANGES
@ -26,7 +26,8 @@ v2.0.0 (TBA)
|
|||||||
-Fixed (issue #524) - INSTALL_FAILED_DEXOPT fix (JesusFreke)
|
-Fixed (issue #524) - INSTALL_FAILED_DEXOPT fix (JesusFreke)
|
||||||
-Fixed (issue #473) - multiple package frameworks are treated correctly.
|
-Fixed (issue #473) - multiple package frameworks are treated correctly.
|
||||||
-Fixed (issue #531) - JAR disassembling borking is fixed
|
-Fixed (issue #531) - JAR disassembling borking is fixed
|
||||||
-Fixed (issue #550) - Corectly labels incorrect type handling of <array>
|
-Fixed (issue #550) - Correctly labels incorrect type handling of <array>
|
||||||
|
-Fixed (issue #571) - Fixed truncated strings (Thanks jtmuhone)
|
||||||
-Added output to list Apktool version to help debugging.
|
-Added output to list Apktool version to help debugging.
|
||||||
-Updated known bytes for configurations to 38 (from addition of layout direction)
|
-Updated known bytes for configurations to 38 (from addition of layout direction)
|
||||||
-Fixed NPE when handling odex apks even with --no-src specified. (Thanks Rodrigo Chiossi)
|
-Fixed NPE when handling odex apks even with --no-src specified. (Thanks Rodrigo Chiossi)
|
||||||
|
@ -102,10 +102,22 @@ public class StringBlock {
|
|||||||
length = getShort(m_strings, offset) * 2;
|
length = getShort(m_strings, offset) * 2;
|
||||||
offset += 2;
|
offset += 2;
|
||||||
} else {
|
} else {
|
||||||
offset += getVarint(m_strings, offset)[1];
|
int val = m_strings[offset];
|
||||||
int[] varint = getVarint(m_strings, offset);
|
if ((val & 0x80) != 0) {
|
||||||
offset += varint[1];
|
offset += 2;
|
||||||
length = varint[0];
|
} else {
|
||||||
|
offset += 1;
|
||||||
|
}
|
||||||
|
val = m_strings[offset];
|
||||||
|
if ((val & 0x80) != 0) {
|
||||||
|
offset += 2;
|
||||||
|
} else {
|
||||||
|
offset += 1;
|
||||||
|
}
|
||||||
|
length = 0;
|
||||||
|
while (m_strings[offset + length] != 0) {
|
||||||
|
length++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return decodeString(offset, length);
|
return decodeString(offset, length);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user