diff options
author | Volker Lendecke <vl@samba.org> | 2012-06-29 13:30:44 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2012-07-03 15:30:16 +0200 |
commit | abda9d334796c34afd53b15348d4ed08bdfef913 (patch) | |
tree | 72cbf1cdc28d008c197a7b27714e00304051a022 /source3/smbd | |
parent | 6710e4edc5d44894ba022a9f6dff4a2acaf24d07 (diff) | |
download | samba-abda9d334796c34afd53b15348d4ed08bdfef913.tar.gz samba-abda9d334796c34afd53b15348d4ed08bdfef913.tar.bz2 samba-abda9d334796c34afd53b15348d4ed08bdfef913.zip |
s3: Fix Coverity ID 709217 Dereference after null check
A few lines before we did check for x != NULL. I think this might
fix a potential remote crash.
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jul 3 15:30:17 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/smb2_server.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index c7f9129b12..653a038da5 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -1594,8 +1594,16 @@ NTSTATUS smbd_smb2_request_dispatch(struct smbd_smb2_request *req) req->do_signing = false; if (flags & SMB2_HDR_FLAG_SIGNED) { - struct smbXsrv_connection *conn = x->connection; - DATA_BLOB signing_key = x->global->channels[0].signing_key; + struct smbXsrv_connection *conn; + DATA_BLOB signing_key; + + if (x == NULL) { + return smbd_smb2_request_error( + req, NT_STATUS_ACCESS_DENIED); + } + + conn = x->connection; + signing_key = x->global->channels[0].signing_key; if (!NT_STATUS_IS_OK(session_status)) { return smbd_smb2_request_error(req, session_status); |