mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libcli/smb: clang: Fix 'Array access results in a null pointer deref'
Fixes: smbXcli_base.c:4393:10: warning: Array access (from variable 'inhdr') results in a null pointer dereference <--[clang] flags = CVAL(inhdr, HDR_FLG); Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
7a86c99ccb
commit
3594c3ae20
@ -4327,7 +4327,7 @@ static void smbXcli_negprot_smb1_done(struct tevent_req *subreq)
|
||||
struct smbXcli_negprot_state);
|
||||
struct smbXcli_conn *conn = state->conn;
|
||||
struct iovec *recv_iov = NULL;
|
||||
uint8_t *inhdr;
|
||||
uint8_t *inhdr = NULL;
|
||||
uint8_t wct;
|
||||
uint16_t *vwv;
|
||||
uint32_t num_bytes;
|
||||
@ -4387,7 +4387,7 @@ static void smbXcli_negprot_smb1_done(struct tevent_req *subreq)
|
||||
NULL, /* pinbuf */
|
||||
expected, ARRAY_SIZE(expected));
|
||||
TALLOC_FREE(subreq);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
if (inhdr == NULL || tevent_req_nterror(req, status)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user