Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ public String get(int id) {
return INVALID_STRING_PLACEHOLDER;
}

long offset = stringsStart + buffer.getInt(id * 4);
int off = buffer.getInt(id * 4);
if (off < 0) {
// read unsigned offset value is larger than Integer.MAX_VALUE
// In reality this should only happen in obfuscated APKs with invalid offsets
return INVALID_STRING_PLACEHOLDER;
}
long offset = stringsStart + off;
String extracted;
if (isUtf8) {
extracted = extractString8(this.buffer.array(), (int) offset);
Expand Down
Loading