[PATCH] Fix int size of the outbuf in smb2cli_query_directory_send

Ralph Böhme slow at samba.org
Mon Jan 30 10:19:48 UTC 2017


On Mon, Jan 30, 2017 at 10:11:54AM +0100, Stefan Metzmacher wrote:
> Hi Ralph,
> 
> I think that should be SIVAL()
> SBVAL is for uint64_t.

oh, this is just so emberassing. Thanks for spotting this!

Updated patch attached.

Cheerio!
-slow
-------------- next part --------------
From d9027b75f1d1a3a2cf610d75d7ae3327a3cfaf37 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Mon, 30 Jan 2017 06:49:58 +0100
Subject: [PATCH] libcli/smb: outbuf length is a IVAL ie a uint32_t

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 libcli/smb/smb2cli_query_directory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcli/smb/smb2cli_query_directory.c b/libcli/smb/smb2cli_query_directory.c
index d1ccdb8..e6321ff 100644
--- a/libcli/smb/smb2cli_query_directory.c
+++ b/libcli/smb/smb2cli_query_directory.c
@@ -80,7 +80,7 @@ struct tevent_req *smb2cli_query_directory_send(TALLOC_CTX *mem_ctx,
 	SBVAL(fixed, 16, fid_volatile);
 	SSVAL(fixed, 24, SMB2_HDR_BODY + 32);
 	SSVAL(fixed, 26, dyn_len);
-	SSVAL(fixed, 28, outbuf_len);
+	SIVAL(fixed, 28, outbuf_len);
 
 	if (dyn_len == 0) {
 		dyn = state->dyn_pad;
-- 
2.9.3



More information about the samba-technical mailing list