mirror of
https://github.com/revanced/smali.git
synced 2025-05-16 14:17:04 +02:00
Gracefully deal with code addresses that are out of range in MutableMethodImplementation
The code addresses in debug info items are not verified, and may be out of bounds. If this happens, we just clamp them to the maximum code address.
This commit is contained in:
parent
580b27f379
commit
0d4443a19a
@ -473,6 +473,9 @@ public class MutableMethodImplementation implements MethodImplementation {
|
||||
private int mapCodeAddressToIndex(@Nonnull int[] codeAddressToIndex, int codeAddress) {
|
||||
int index;
|
||||
do {
|
||||
if (codeAddress >= codeAddressToIndex.length) {
|
||||
codeAddress = codeAddressToIndex.length - 1;
|
||||
}
|
||||
index = codeAddressToIndex[codeAddress];
|
||||
if (index < 0) {
|
||||
codeAddress--;
|
||||
|
Loading…
x
Reference in New Issue
Block a user