]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: In SMB1 old protocol - return NT_STATUS_INVALID_NETWORK_RESPONSE if name...
authorJeremy Allison <jra@samba.org>
Mon, 11 May 2020 19:34:10 +0000 (12:34 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 12 May 2020 19:53:46 +0000 (19:53 +0000)
Can happen if namelen == 0.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14374

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/clilist.c

index f868e72a239e4b2aa2ba230fa08b80c834899d37..28449dec81c7912806a1733232f1d5472f283151 100644 (file)
@@ -552,7 +552,10 @@ static NTSTATUS cli_list_old_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
                        TALLOC_FREE(finfo);
                        return NT_STATUS_NO_MEMORY;
                }
-
+               if (finfo->name == NULL) {
+                       TALLOC_FREE(finfo);
+                       return NT_STATUS_INVALID_NETWORK_RESPONSE;
+               }
                status = is_bad_finfo_name(state->cli, finfo);
                if (!NT_STATUS_IS_OK(status)) {
                        smbXcli_conn_disconnect(state->cli->conn, status);