]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove unnecessary code
authorVolker Lendecke <vl@samba.org>
Wed, 1 Jul 2026 16:02:01 +0000 (18:02 +0200)
committerAnoop C S <anoopcs@samba.org>
Fri, 3 Jul 2026 05:51:26 +0000 (05:51 +0000)
A few lines above we already have zeroed out the first 16 bytes of
blob_out.data.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Fri Jul  3 05:51:26 UTC 2026 on atb-devel-224

source3/smbd/smb2_negprot.c

index 1d3fd4b959cbc5f5bcd5383e7b9db44fe3bcca6b..dbc6e88a0965227435dd8a15b5c7c8e3ed867bab 100644 (file)
@@ -1002,9 +1002,6 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbXsrv_connection *xconn)
        nstring dos_name;
        fstring unix_name;
        NTSTATUS status;
-#ifdef DEVELOPER
-       size_t slen;
-#endif
        struct gensec_security *gensec_security;
 
        /* See if we can get an SPNEGO blob */
@@ -1065,14 +1062,6 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbXsrv_connection *xconn)
        push_ascii_nstring(dos_name, unix_name);
        strlcpy((char *)blob_out.data, dos_name, 17);
 
-#ifdef DEVELOPER
-       /* Fix valgrind 'uninitialized bytes' issue. */
-       slen = strlen(dos_name);
-       if (slen < 16) {
-               memset(blob_out.data+slen, '\0', 16 - slen);
-       }
-#endif
-
        memcpy(&blob_out.data[16], blob.data, blob.length);
 
        data_blob_free(&blob);