]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Fix segfault in smb2_reply
authorAndreas Schneider <asn@samba.org>
Fri, 14 Nov 2025 09:59:19 +0000 (10:59 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 14 Nov 2025 14:00:31 +0000 (14:00 +0000)
This is triggered by: make test TESTS="samba3.smb2.streams.simpleserver

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

Pair-Programmed-With: Ralph Boehme <slow@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_reply.c

index 48aa5c86038d1916447e2f93e4009ed02b0ad0bb..069d447b51c037b03681af3b7847a880b40597a3 100644 (file)
@@ -1399,7 +1399,8 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
 
        if (fsp_is_alternate_stream(fsp)) {
                if (newname[0] != ':') {
-                       return NT_STATUS_INVALID_PARAMETER;
+                       status = NT_STATUS_INVALID_PARAMETER;
+                       goto out;
                }
 
                smb_fname_dst = synthetic_smb_fname(ctx,