From 62dc7f6b2dd7df83740e4761988eb2f87205c73c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 10 Dec 2009 14:48:56 +1100 Subject: s4-libcli: GUID_from_ndr_blob() is strict about the blob size We need to create a blob of the right length --- source4/libcli/raw/rawfsinfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source4') diff --git a/source4/libcli/raw/rawfsinfo.c b/source4/libcli/raw/rawfsinfo.c index 4c79ba066c..15599adebe 100644 --- a/source4/libcli/raw/rawfsinfo.c +++ b/source4/libcli/raw/rawfsinfo.c @@ -214,14 +214,16 @@ NTSTATUS smb_raw_fsinfo_passthru_parse(DATA_BLOB blob, TALLOC_CTX *mem_ctx, fsinfo->full_size_information.out.bytes_per_sector = IVAL(blob.data, 28); break; - case RAW_QFS_OBJECTID_INFORMATION: + case RAW_QFS_OBJECTID_INFORMATION: { + DATA_BLOB b2 = data_blob_const(blob.data, MIN(16, blob.length)); QFS_CHECK_SIZE(64); - status = GUID_from_ndr_blob(&blob, &fsinfo->objectid_information.out.guid); + status = GUID_from_ndr_blob(&b2, &fsinfo->objectid_information.out.guid); NT_STATUS_NOT_OK_RETURN(status); for (i=0;i<6;i++) { fsinfo->objectid_information.out.unknown[i] = BVAL(blob.data, 16 + i*8); } break; + } default: status = NT_STATUS_INVALID_INFO_CLASS; -- cgit