Fix large aae

This commit is contained in:
pancake 2020-04-13 23:28:34 +02:00
parent 21232718f0
commit 24b5584bef

View File

@ -16,6 +16,8 @@ enum {
R2_ARCH_ARM64,
R2_ARCH_MIPS
};
// 128M
#define MAX_SCAN_SIZE 0x7ffffff
static void loganal(ut64 from, ut64 to, int depth) {
r_cons_clear_line (1);
@ -4861,6 +4863,10 @@ R_API void r_core_anal_esil(RCore *core, const char *str, const char *target) {
if (iend < 0) {
return;
}
if (iend > MAX_SCAN_SIZE) {
eprintf ("Warning: Not going to analyze 0x%08"PFMT64x" bytes.\n", (ut64)iend);
return;
}
buf = malloc (iend + 2);
if (!buf) {
perror ("malloc");