From ae233a0fa4e8ae51c56191d504f7965734465e14 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 7 Sep 2014 21:09:32 +0200 Subject: [PATCH] torture: Correctly initialize array size Bug: https://bugzilla.samba.org/show_bug.cgi?id=10800 Signed-off-by: Volker Lendecke --- source4/torture/smb2/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source4/torture/smb2/dir.c b/source4/torture/smb2/dir.c index 0e409f2..cf96fee 100644 --- a/source4/torture/smb2/dir.c +++ b/source4/torture/smb2/dir.c @@ -895,7 +895,6 @@ static bool check_result(struct torture_context *tctx, static bool test_modify_search(struct torture_context *tctx, struct smb2_tree *tree) { - int num_files = 700; struct multiple_result result; union smb_setfileinfo sfinfo; TALLOC_CTX *mem_ctx = talloc_new(tctx); @@ -903,7 +902,8 @@ static bool test_modify_search(struct torture_context *tctx, struct smb2_handle h; struct smb2_find f; union smb_search_data *d; - struct file_elem files[702] = {}; + struct file_elem files[703] = {}; + int num_files = ARRAY_SIZE(files)-3; NTSTATUS status; bool ret = true; int i; -- 1.7.9.5