summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-07-02 15:24:40 +0200
committerJeremy Allison <jra@samba.org>2013-07-02 12:22:08 -0700
commit474eee0df7893a3a4546e1c6ea47220700c5b99f (patch)
tree7583490f058762ab81e150c1412201bac9430d25 /source4/torture
parent0b58eed3351e207b0a0f0d32fe37ea5bee9dbc33 (diff)
downloadsamba-474eee0df7893a3a4546e1c6ea47220700c5b99f.tar.gz
samba-474eee0df7893a3a4546e1c6ea47220700c5b99f.tar.bz2
samba-474eee0df7893a3a4546e1c6ea47220700c5b99f.zip
torture: Fix comparsion of uninitalized bytes.
As we compare string make sure we have the null terminator. Found by valgrind. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/session.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/torture/raw/session.c b/source4/torture/raw/session.c
index 5b5b782a1c..fbfdced2f8 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");
+ buf[dlen] = '\0';
+
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");