summaryrefslogtreecommitdiff
path: root/source4/libcli/rpc/dcerpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/rpc/dcerpc.c')
-rw-r--r--source4/libcli/rpc/dcerpc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/libcli/rpc/dcerpc.c b/source4/libcli/rpc/dcerpc.c
index 96a355c9e1..b620718755 100644
--- a/source4/libcli/rpc/dcerpc.c
+++ b/source4/libcli/rpc/dcerpc.c
@@ -199,7 +199,7 @@ static NTSTATUS dcerpc_pull_response(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
stub_len = blob->length - ((*offset) + hdr->auth_length);
BLOB_CHECK_BOUNDS(blob, *offset, stub_len);
pkt->stub_data = data_blob_talloc(mem_ctx, blob->data + (*offset), stub_len);
- if (!pkt->stub_data.data) {
+ if (stub_len != 0 && !pkt->stub_data.data) {
return NT_STATUS_NO_MEMORY;
}
(*offset) += stub_len;