From: John Thacker Date: Sun, 12 Oct 2025 19:11:39 +0000 (-0400) Subject: wireshark-pidl: Fix filter names for subcontext length fields X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe67eb0a7fdb28b92fc17ba20c18ee4dd912cfdd;p=thirdparty%2Fsamba.git wireshark-pidl: Fix filter names for subcontext length fields From the Wireshark development branch: commit e3d8636109182d7e243eea6216af7f14edda3227 Author: John Thacker Date: Thu Oct 9 20:06:43 2025 -0400 pidl: Fix filter names for subcontext length fields The Perl variable $_->{NAME} never exists at the point in the code; $e->{NAME} is almost surely intended instead, which makes the subcontext length field have the same filter name as the parent field with ".subcontext" added. This changes a few fields, including making some fields in the same struct or union that incorrectly shared a filter name now have unique filter names. Also prevents Perl warnings: Use of uninitialized value in concatenation (.) or string at /builds/wireshark/wireshark/tools/pid l/lib/Parse/Pidl/Wireshark/NDR.pm line 438. Signed-off-by: John Thacker Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 667199ecbd5..ce0010acc98 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -410,7 +410,7 @@ sub ElementLevel($$$$$$$$) $varswitch = $e->{PROPERTIES}->{switch_is}; } my $num_bits = ($l->{HEADER_SIZE}*8); - my $hf2 = $self->register_hf_field($hf."_", "Subcontext length", "$ifname.$pn.$_->{NAME}subcontext", "FT_UINT$num_bits", "BASE_HEX", "NULL", 0, ""); + my $hf2 = $self->register_hf_field($hf."_", "Subcontext length", "$ifname.$pn.$e->{NAME}.subcontext", "FT_UINT$num_bits", "BASE_HEX", "NULL", 0, ""); $num_bits = 3264 if ($num_bits == 32); $self->{hf_used}->{$hf2} = 1; $self->pidl_code("guint$num_bits size;");