From: John Thacker Date: Sat, 22 Jun 2024 11:08:27 +0000 (-0400) Subject: Revert "pidl: Use non-existent function dissect_ndr_int64()" X-Git-Tag: tdb-1.4.11~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e0c693f78ad3741ac4ed4c21f1faa5d5a72d54a;p=thirdparty%2Fsamba.git Revert "pidl: Use non-existent function dissect_ndr_int64()" This reverts commit a836b433ed7f0acca546558d2aec359155999f30. Wireshark's NDR dissector dissects both signed and unsigned types of the same size and alignment with the same functions, e.g. see the handling of "udlong" and "dlong." It is passing the FT_UINT64 vs FT_INT64 field type enum value that determines at the last moment whether a value is cast to signed. dissect_ndr_uint64() already has the proper behavior for 8-byte aligned signed 64 bit integers, and a dissect_ndr_int64() function will not need to be introduced. Signed-off-by: John Thacker Reviewed-by: Douglas Bagnall Reviewed-by: Jo Sutton Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Wed Jul 3 14:19:04 UTC 2024 on atb-devel-224 --- diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 05ef8b78554..44d81dbabe2 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -1105,7 +1105,7 @@ sub Initialize($$) $self->register_type("uint3264", "offset = dissect_ndr_uint3264(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_UINT32", "BASE_DEC", 0, "NULL", 8); $self->register_type("hyper", "offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_UINT64", "BASE_DEC", 0, "NULL", 8); - $self->register_type("int64", "offset = dissect_ndr_int64(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_INT64", "BASE_DEC", 0, "NULL", 8); + $self->register_type("int64", "offset = dissect_ndr_uint64(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_INT64", "BASE_DEC", 0, "NULL", 8); $self->register_type("udlong", "offset = dissect_ndr_duint32(tvb, offset, pinfo, tree, di, drep, \@HF\@, NULL);", "FT_UINT64", "BASE_DEC", 0, "NULL", 4); $self->register_type("bool8", "offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, \@HF\@, \@PARAM\@);","FT_INT8", "BASE_DEC", 0, "NULL", 1); $self->register_type("char", "offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, di, drep, \@HF\@, \@PARAM\@);","FT_INT8", "BASE_DEC", 0, "NULL", 1);