Wireshark-commits: [Wireshark-commits] master 0696d93: Don't just grab raw string data with tvb_mem

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 17 Jul 2019 15:07:26 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0696d9349524ae06d17e774f5590a0b94ebae1c9
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

0696d93 by Guy Harris (guy@xxxxxxxxxxxx):

    Don't just grab raw string data with tvb_memcpy().
    
    Use proto_tree_add_item_ret_display_string() routines to add strings if
    we want to display the string's value in a column, and just use
    proto_tree_add_item() if we don't need the string's value.  That way,
    all strings are fetched using an encoding value, to properly map to
    UTF-8, and, if necessary, are formatted for display.
    
    Add comments about fields that have type VisibleString, asking whether
    that means "ASCII" or "just the "Basic" part of ISO 646", where the
    latter is ENC_ISO_646_BASIC.
    
    Add a comment about fields using "The definition of IETF RFC 5890" -
    that means "Punycode", but I don't think we map Punycode to Unicode;
    perhaps we should.  Also ask whether that also implies RFC 1035's
    encoding of domain names as sequences of counted strings.
    
    Change-Id: Ie8d5bc18d2846f8d723019b22f69a50ce55f9a9b
    Reviewed-on: https://code.wireshark.org/review/33986
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  f735f91   tvbuff_lz*: fix typo in comment
     add  0696d93   Don't just grab raw string data with tvb_memcpy().


Summary of changes:
 plugins/epan/profinet/packet-dcerpc-pn-io.c | 183 +++++++++-------------------
 1 file changed, 58 insertions(+), 125 deletions(-)