diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-12-09 10:33:21 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:06:28 -0500 |
commit | b7f53e9d1807f854b6bd1b357bc4a20ab48a4a89 (patch) | |
tree | d4c72e303c9b1d6dc3d88173ce3d8fb85f7cc90d /source4/librpc | |
parent | f94aee4e8801700b82ad41f64b6b74c369760032 (diff) | |
download | samba-b7f53e9d1807f854b6bd1b357bc4a20ab48a4a89.tar.gz samba-b7f53e9d1807f854b6bd1b357bc4a20ab48a4a89.tar.bz2 samba-b7f53e9d1807f854b6bd1b357bc4a20ab48a4a89.zip |
r4115: check for gensec errors before calling memcpy on a set of credentials,
otherwise the creds structure might be invalid
(This used to be commit 76285b3390f20366d53c7b2509ac07e1f88f7309)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index 3cd069c794..9217c90e0e 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -400,6 +400,9 @@ static NTSTATUS dcerpc_push_request_sign(struct dcerpc_pipe *p, blob->length - p->security_state.auth_info->credentials.length, &creds2); + if (!NT_STATUS_IS_OK(status)) { + return status; + } memcpy(blob->data + blob->length - creds2.length, creds2.data, creds2.length); break; @@ -412,6 +415,9 @@ static NTSTATUS dcerpc_push_request_sign(struct dcerpc_pipe *p, blob->length - p->security_state.auth_info->credentials.length, &creds2); + if (!NT_STATUS_IS_OK(status)) { + return status; + } memcpy(blob->data + blob->length - creds2.length, creds2.data, creds2.length); break; |