On Mon 04 Aug 2014 07:42:57 zubin.mit...@gmail.com wrote: > From: Zubin Mithra <zubin.mit...@gmail.com> > > * file.c (sys_getdents): Add d_reclen check. > (sys_getdents64): Add d_reclen check. > > Signed-off-by: Zubin Mithra <zubin.mit...@gmail.com> > --- > file.c | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/file.c b/file.c > index a92a7dc..0934ce1 100644 > --- a/file.c > +++ b/file.c > @@ -2076,6 +2076,10 @@ sys_getdents(struct tcb *tcp) > i ? " " : "", d->d_ino, d->d_off); > tprintf("d_reclen=%u, d_name=\"%s\", d_type=", > d->d_reclen, d->d_name); > + if (i + d->d_reclen >= len) {
i don't think we have to worry about integer overflow as d_reclen is normally a short. as such, this LGTM. thanks ! Acked-by: Mike Frysinger <vap...@gentoo.org> -mike
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------------ 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