This line in certain situations throws IndexError, which is silenced elsewhere (because analysis does not fail overall):
|
valueOfRegList[argIdx].value_type = argTypes[argIdx] |
This happens (at least, in my test case usage Telegram_12.0.0_APKPure.apk) on instruction "filled-new-array", where targetMethod is "new-array()".
instruction ['filled-new-array', 'v13', 'v11', 'v12', 'new-array()[I']
targetMethod new-array()[I
argIdxWithoutType [1, 2]
valueOfRegList [Primitive('0'), Primitive('1'), Primitive('2')]
argTypes ['new-array()[', '']
argIdx 2
new-array() does not have argument type aliases inside parentheses, so array argTypes is not filled.
|
rawArgTypes = targetMethod[ |
|
targetMethod.find("(") + 1 : targetMethod.find(")") |
|
].split(" ") |
|
|
|
for argType in rawArgTypes: |
|
argTypes.append(argType) |
|
if argType in ["J", "D"]: |
|
# Put long and double twice |
|
# because these types take up two registers. |
|
argTypes.append(argType) |
However, new-array does specify argument type after bracket, i.e. new-array()[I indicates, that it's array of integers, so maybe arguments should be parsed from there?
This line in certain situations throws IndexError, which is silenced elsewhere (because analysis does not fail overall):
quark-engine/quark/evaluator/pyeval.py
Line 213 in 05e7ffa
This happens (at least, in my test case usage
Telegram_12.0.0_APKPure.apk) on instruction "filled-new-array", where targetMethod is "new-array()".new-array()does not have argument type aliases inside parentheses, so arrayargTypesis not filled.quark-engine/quark/evaluator/pyeval.py
Lines 201 to 210 in 05e7ffa
However, new-array does specify argument type after bracket, i.e.
new-array()[Iindicates, that it's array of integers, so maybe arguments should be parsed from there?