notaz.gp2x.de
/
ia32rtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f70a34
)
translate: detect more invalid writes to args
author
notaz
<notasas@gmail.com>
Sun, 9 Mar 2014 19:19:31 +0000
(21:19 +0200)
committer
notaz
<notasas@gmail.com>
Sun, 9 Mar 2014 19:19:31 +0000
(21:19 +0200)
tools/translate.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/translate.c
b/tools/translate.c
index
778df52
..
66f2a50
100644
(file)
--- 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);