Do not perform var/arg analysis on Java/Dalvik ##anal

* Fix almost an infinite loop on a clusterfuzzed dex file
This commit is contained in:
Sergi Àlvarez i Capilla 2022-03-07 17:41:29 +01:00 committed by pancake
parent a5489ebff3
commit f72b7b5a50

View File

@ -3488,6 +3488,12 @@ R_API void r_core_recover_vars(RCore *core, RAnalFunction *fcn, bool argonly) {
if (core->anal->opt.bb_max_size < 1) {
return;
}
if (core->anal->cur && core->anal->cur->arch) {
if (!strcmp (core->anal->cur->arch, "java") || !strcmp (core->anal->cur->arch, "dalvik")) {
// var/arg info in dalvik is provided by the bin format, same goes for java
return;
}
}
BlockRecurseCtx ctx = { 0, {{ 0 }}, argonly, fcn, core };
r_pvector_init (&ctx.reg_set, free);
int *reg_set = R_NEWS0 (int, REG_SET_SIZE);