summaryrefslogtreecommitdiff
path: root/source4/libcli/smb2/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/smb2/read.c')
-rw-r--r--source4/libcli/smb2/read.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source4/libcli/smb2/read.c b/source4/libcli/smb2/read.c
index 0d63a6ba0a..720d0bdbe0 100644
--- a/source4/libcli/smb2/read.c
+++ b/source4/libcli/smb2/read.c
@@ -73,11 +73,7 @@ NTSTATUS smb2_read_recv(struct smb2_request *req,
nread = IVAL(req->in.body, 0x04);
memcpy(io->out.unknown, req->in.body+0x08, 8);
- if (smb2_oob_in(req, req->in.hdr+ofs, nread)) {
- return NT_STATUS_BUFFER_TOO_SMALL;
- }
-
- io->out.data = data_blob_talloc(mem_ctx, req->in.hdr+ofs, nread);
+ io->out.data = smb2_pull_blob(&req->in, mem_ctx, req->in.hdr+ofs, nread);
if (io->out.data.data == NULL) {
return NT_STATUS_NO_MEMORY;
}