From: Zubin Mithra <zubin.mit...@gmail.com> * bjm.c (sys_query_module): Add bounds check.
Signed-off-by: Zubin Mithra <zubin.mit...@gmail.com> --- bjm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bjm.c b/bjm.c index b34c6ed..b5ce103 100644 --- a/bjm.c +++ b/bjm.c @@ -121,6 +121,8 @@ sys_query_module(struct tcb *tcp) (idx ? ", " : ""), mod); mod += strlen(mod)+1; + if (mod-data >= tcp->u_arg[3]) + break; } } free(data); @@ -144,6 +146,8 @@ sys_query_module(struct tcb *tcp) tprintf(" /* %lu entries */ ", (unsigned long)ret); } else { for (idx = 0; idx < ret; idx++) { + if ((long)sym->name >= tcp->u_arg[3]) + break; tprintf("%s{name=%s, value=%lu}", (idx ? " " : ""), data+(long)sym->name, -- 1.8.4 ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel