fix: elemSize=0 fill_array_data_payload insn obfuscation (PR #1082)

Co-authored-by: hexun <hexun@fenbi.com>
This commit is contained in:
alienhe
2021-01-15 17:10:33 +08:00
committed by GitHub
parent 3dfaec5033
commit a3ea514521
2 changed files with 5 additions and 0 deletions
@@ -39,6 +39,7 @@ public final class FillArrayData extends InsnNode {
private static ArgType getElementType(int elementWidthUnit) {
switch (elementWidthUnit) {
case 1:
case 0:
return ONE_BYTE_TYPE;
case 2:
return TWO_BYTES_TYPE;
@@ -336,6 +336,10 @@ public abstract class DexInsnFormat {
data = array;
break;
}
case 0: {
data = new byte[0];
break;
}
default:
throw new DexException("Unexpected element size in FILL_ARRAY_DATA_PAYLOAD: " + elemSize);
}