s3: smbd: Uncorrupt the pointer we were using to prove a crash.
authorJeremy Allison <jra@samba.org>
Fri, 11 Aug 2023 17:47:28 +0000 (10:47 -0700)
committerVolker Lendecke <vl@samba.org>
Mon, 14 Aug 2023 14:57:32 +0000 (14:57 +0000)
Rather than restore to uninitialized, set to NULL as per
modern coding practices.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15420
Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/smb1_sesssetup.c

index fe59a4781fbe8a18c6b35c7c2ec982d0362c9be6..e0c601c34c74860aee8ae4ef312898721db1d8b0 100644 (file)
@@ -581,7 +581,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
        struct reply_sesssetup_and_X_state *state = NULL;
        uint64_t sess_vuid;
        uint16_t smb_bufsize;
-       char *tmp = (char *)0xDEADBEEF;
+       char *tmp = NULL;
        fstring sub_user; /* Sanitised username for substitution */
        const char *native_os;
        const char *native_lanman;