Wireshark-commits: [Wireshark-commits] master ee35570: Improve handling of binary data that *might*
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 07 Jun 2019 21:15:30 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=ee35570e90434289d76fb492c694999f7464f42d
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

ee35570 by Guy Harris (guy@xxxxxxxxxxxx):

    Improve handling of binary data that *might* be text.
    
    Add a BASE_SHOW_ASCII_PRINTABLE flag for the "display" field, to use
    with FT_BYTES and FT_UINT_BYTES fields; it specifies that, if the field
    consists solely of printable ASCII characters, its value be displayed as
    a string, in quotes.  Have a routine hfinfo_format_bytes() to do that
    formatting, depending on the display field value.
    
    Add routines to fetch the display value of string and
    FT_BYTES/FT_UINT_BYTES fields; for strings, it's the result of
    hfinfo_format_text(), and for byte arrays, it's the result of
    hfinfo_format_bytes().
    
    Use BASE_SHOW_ASCII_PRINTABLE for extended attribute data in SMB and
    SMB2.  Use the routines in question for extended attribute names
    (string) and data (bytes).  That keeps us from displaying non-text
    extended attribute data as if it were text.
    
    Document BASE_SHOW_ASCII_PRINTABLE.
    
    Change-Id: I24dcf459c14f00985e4daaf9b58f5933964eabd8
    Reviewed-on: https://code.wireshark.org/review/33517
    Petri-Dish: Guy Harris <guy@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  c603fac   Windows: upgrade USBPcap to 1.4.1.0
     add  ee35570   Improve handling of binary data that *might* be text.


Summary of changes:
 debian/libwireshark0.symbols  |   2 +
 doc/README.dissector          |  26 ++++--
 epan/dissectors/packet-smb.c  |  12 ++-
 epan/dissectors/packet-smb2.c |  37 ++++-----
 epan/proto.c                  | 189 +++++++++++++++++++++++++-----------------
 epan/proto.h                  |  46 ++++++++--
 6 files changed, 191 insertions(+), 121 deletions(-)