[PATCH 1/7] torture: Fix comparsion of uninitalized bytes.
Andreas Schneider
asn at samba.org
Tue Jul 2 04:23:24 MDT 2013
On Tuesday 02 July 2013 08:49:06 Volker Lendecke wrote:
> On Mon, Jul 01, 2013 at 01:02:42PM +0200, Andreas Schneider wrote:
> > Found by valgrind.
> >
> > Signed-off-by: Andreas Schneider <asn at samba.org>
> > ---
> >
> > source4/torture/raw/session.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/source4/torture/raw/session.c b/source4/torture/raw/session.c
> > index 5b5b782..a592f14 100644
> > --- a/source4/torture/raw/session.c
> > +++ b/source4/torture/raw/session.c
> > @@ -70,6 +70,8 @@ static bool test_session_reauth1(struct torture_context
> > *tctx,>
> > torture_assert_ntstatus_ok_goto(tctx, status, ok, done, "setup2");
> > torture_assert_int_equal_goto(tctx, io.out.vuid, vuid1, ok, done,
> > "setup2");>
> > + memset(buf, '\0', sizeof(buf));
> > +
> >
> > num = smbcli_read(cli->tree, fnum, &buf, 0, dlen);
> > torture_assert_int_equal_goto(tctx, num, dlen, ok, done, "read file");
> > torture_assert_str_equal_goto(tctx, buf, data, ok, done, "read file");
>
> That fix looks wrong. Shouldn't smbcli_read init that?
Yes, you're right, patch will follow.
Thanks,
-- andreas
--
Andreas Schneider GPG-ID: F33E3FC6
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list