]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/smb: Set error status if 'iov' pointer is NULL
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 22 Aug 2022 04:56:46 +0000 (16:56 +1200)
committerStefan Metzmacher <metze@samba.org>
Mon, 22 Aug 2022 09:03:29 +0000 (09:03 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15152

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Aug 22 09:03:29 UTC 2022 on sn-devel-184

libcli/smb/smbXcli_base.c

index 11d13b574a76377be5089f0d7ae14dc7684977f1..c5d13bd58376e2d574a09c76eae09497f62338a3 100644 (file)
@@ -5013,7 +5013,11 @@ 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) || iov == NULL) {
+       if (tevent_req_nterror(req, status)) {
+               return;
+       }
+       if (iov == NULL) {
+               tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
                return;
        }