mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
libcli/smb: clang: Fix 'Dereference of null pointer'
Fixes: smbXcli_base.c:4885:20: warning: Dereference of null pointer <--[clang] body = (uint8_t *)iov[1].iov_base; ^~~~~~~~~~~~~~~ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
3594c3ae20
commit
fb49e411aa
@ -4851,7 +4851,7 @@ static void smbXcli_negprot_smb2_done(struct tevent_req *subreq)
|
||||
size_t security_offset, security_length;
|
||||
DATA_BLOB blob;
|
||||
NTSTATUS status;
|
||||
struct iovec *iov;
|
||||
struct iovec *iov = NULL;
|
||||
uint8_t *body;
|
||||
size_t i;
|
||||
uint16_t dialect_revision;
|
||||
@ -4879,7 +4879,7 @@ static void smbXcli_negprot_smb2_done(struct tevent_req *subreq)
|
||||
|
||||
status = smb2cli_req_recv(subreq, state, &iov,
|
||||
expected, ARRAY_SIZE(expected));
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
if (tevent_req_nterror(req, status) || iov == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user