From b340dc8de8e0d5a38466d1f448a936ab9f790290 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 10 Sep 2020 18:32:35 -0700 Subject: SAP: make the Server Name field FT_STRINGZPAD. According to the Novell IPX Router Specification, Chapter 4 "Service Advertising Protocol (SAP)": Server Name This field contains the 48 byte character string name that is assigned to a server. The Server Name, in combination with the Service Type, uniquely identifies a server on an internetwork. Although SAP response packets always include the full 48 bytes for this field, typical server names are usually less than 48 characters long and are ASCII NULL terminated. The contents of the unused bytes which follow the NULL terminator are undefined. which seems to indicate that a full 48-byte name will not have a null termintor. It also indicates that the field isn't null-padded, just "null-terminated if it's not terminated by the end of the field's fixed length"; perhaps we need to distinguish between the former and the latter, although it's not clear what would be a good short name for the latter. In any case, it sounds as if it's not guaranteed to be null-terminated. --- epan/dissectors/packet-ipx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index 5ba58334ab..5425c6e5ef 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -1486,7 +1486,7 @@ proto_register_ipx(void) { &hf_sap_server_name, { "Server Name", "ipxsap.server.name", - FT_STRINGZ, BASE_NONE, NULL, 0x0, + FT_STRINGZPAD, BASE_NONE, NULL, 0x0, NULL, HFILL }}, { &hf_sap_server_network, -- cgit v1.2.3