From 5634f240fd4273cb7327111140ccbea0fd41e3fc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 27 Aug 2013 09:39:17 +0000 Subject: smbd: Fix error return for STREAM_INFO The stream_info marshalling follows its own rules. This needs unifying eventually... Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106 Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/trans2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 37f578c2d3..576e289b86 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -4243,6 +4243,10 @@ static NTSTATUS marshall_stream_info(unsigned int num_streams, unsigned int i; unsigned int ofs = 0; + if (max_data_bytes < 32) { + return NT_STATUS_INFO_LENGTH_MISMATCH; + } + for (i = 0; i < num_streams; i++) { unsigned int next_offset; size_t namelen; -- cgit