From de041e5bb00202dfd32327aaed9fc09c4ed28b95 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 9 Mar 2014 21:19:31 +0200 Subject: [PATCH] translate: detect more invalid writes to args --- tools/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/translate.c b/tools/translate.c index 778df52..66f2a50 100644 --- a/tools/translate.c +++ b/tools/translate.c @@ -1496,7 +1496,8 @@ static int stack_frame_access(struct parsed_op *po, // common problem guess_lmod_from_c_type(&tmp_lmod, &g_func_pp->arg[i].type); if (tmp_lmod != OPLM_DWORD - && (unaligned || (!is_src && tmp_lmod < popr->lmod))) + && (unaligned || (!is_src && lmod_bytes(po, tmp_lmod) + < lmod_bytes(po, popr->lmod) + (offset & 3)))) { ferr(po, "bp_arg arg%d/w offset %d and type '%s' is too small\n", i + 1, offset, g_func_pp->arg[i].type.name); -- 2.39.5