Wireshark-dev: Re: [Wireshark-dev] Some apparent type bugs

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 31 Jul 2020 13:47:21 +0200
Hi Anders,

This code in packet-pfcp.c, line 7482 looks wrong to me

    /* Octet 5 to 20   NF Instance ID */
    proto_tree_add_item_ret_uint(tree, hf_pfcp_nf_instance_id, tvb, offset, 1, ENC_BIG_ENDIAN, &id_length);

Isn’t this supposed to be

    /* Octet 5 to 20   NF Instance ID */
    proto_tree_add_item(tree, hf_pfcp_nf_instance_id, tvb, offset, id_length, ENC_BIG_ENDIAN);
    offset += id_length;

Thanks,
Jaap

On 31 Jul 2020, at 11:28, Martin Mathieson via Wireshark-dev <wireshark-dev@xxxxxxxxxxxxx> wrote:

Error: proto_tree_add_item_ret_uint (.., hf_pfcp_nf_instance_id , ...) called at ./tools/../epan/dissectors/packet-pfcp.c 7482 with type FT_GUID
    (allowed types are {'FT_CHAR', 'FT_UINT32', 'FT_UINT24', 'FT_UINT16', 'FT_UINT8'} )