summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorRalph Wuerthner <ralph.wuerthner@de.ibm.com>2013-07-10 16:43:39 +0200
committerJeremy Allison <jra@samba.org>2013-08-05 16:46:06 -0700
commit270d29a743a030653037cb176f3764bec3c79b6c (patch)
treeb9cafb7c4b76934700101fcbeb0d43fc1f4dd2ba /source3
parentec46f6b91941e38dd92f8e0fb0f278592e3157b6 (diff)
downloadsamba-270d29a743a030653037cb176f3764bec3c79b6c.tar.gz
samba-270d29a743a030653037cb176f3764bec3c79b6c.tar.xz
samba-270d29a743a030653037cb176f3764bec3c79b6c.zip
s3:smbd: allow info class SMB_QUERY_FS_ATTRIBUTE_INFO to return partial data
Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 3bd5656cd1..da0b1ea92c 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3267,6 +3267,12 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)st.st_ex_dev, (u
STR_UNICODE);
SIVAL(pdata,8,len);
data_len = 12 + len;
+ if (max_data_bytes >= 16 && data_len > max_data_bytes) {
+ /* the client only requested a portion of the
+ file system name */
+ data_len = max_data_bytes;
+ status = STATUS_BUFFER_OVERFLOW;
+ }
break;
case SMB_QUERY_FS_LABEL_INFO: