]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc/tests: Initialize name _test_ndr_pull_dns_string_list
authorAndreas Schneider <asn@samba.org>
Thu, 9 Apr 2026 05:27:11 +0000 (07:27 +0200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 16 Apr 2026 00:54:43 +0000 (00:54 +0000)
When ndr_pull_struct_blob fails (which it will for labels containing
dots, now rejected by the new dns_component_copy check), name remains
uninitialized and the subsequent push call dereference it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
librpc/tests/test_ndr_dns_nbt.c

index 1e2ef45c10dd1aeb124e00b80fed0e2562b57e19..3b780ac7791c7c1299bac5b980cbeaef8a970efa 100644 (file)
@@ -81,7 +81,7 @@ static char *_test_ndr_pull_dns_string_list(TALLOC_CTX *mem_ctx,
                                                     dot_every,
                                                     is_nbt);
 
-       char *name;
+       char *name = NULL;
        ndr_pull_flags_fn_t fn;
 
        if (is_nbt) {