[PATCH] torture: Fix raw.open.chained-openx

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Nov 27 13:48:40 MST 2014


Hi!

I'd appreciate review&push!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From b79ce63f3b47792080b9d1de5f96a74f1858418b Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 27 Nov 2014 21:44:18 +0100
Subject: [PATCH] torture: Fix raw.open.chained-openx

sizeof(buf) is 5. On FreeBSD10/clang this overwrites "ret". Not good.

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source4/torture/raw/open.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 679a7c2..616ba5c 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1386,8 +1386,8 @@ static bool test_chained(struct torture_context *tctx, struct smbcli_state *cli)
 	io.openxreadx.in.timeout = 0;
 	
 	io.openxreadx.in.offset = 0;
-	io.openxreadx.in.mincnt = sizeof(buf);
-	io.openxreadx.in.maxcnt = sizeof(buf);
+	io.openxreadx.in.mincnt = sizeof(buf2);
+	io.openxreadx.in.maxcnt = sizeof(buf2);
 	io.openxreadx.in.remaining = 0;
 	io.openxreadx.out.data = (uint8_t *)buf2;
 
-- 
2.1.0



More information about the samba-technical mailing list