]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerJule Anger <janger@samba.org>
Wed, 16 Aug 2023 08:47:14 +0000 (08:47 +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>
(cherry picked from commit 5bc50d2ea4444244721e72b4264311c7005d2f3c)

source3/smbd/smb1_sesssetup.c

index 785c9d5da133c103818f46175d0a431b0e701867..29302f9c56b4fddecb5e554c91e42f8bbec56948 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;