Wireshark-commits: [Wireshark-commits] master 2ce378f: packet_xml: detect and handle UTF-16 BOM

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 12 Aug 2020 06:27:42 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=2ce378f8ab92e6c8d87b9472033a641ea98d3e80
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

2ce378f by David Perry (boolean263@xxxxxxxxxxxxxx):

    packet_xml: detect and handle UTF-16 BOM
    
    In the main dissector, check the first 2/3 bytes for recognized
    Byte-Order Marks (BOM) and decode if detected.
    
    In the heuristic check, when unicode heuristics are enabled, check the
    first 2 bytes for a recognized BOM instead of assuming UCS-2LE. (Still
    falls back on that if no BOM detected.)
    
    Bug: 9069
    Change-Id: I7c6510221ef9257a9c3030715906e07b88af6aa7
    Reviewed-on: https://code.wireshark.org/review/38076
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  dae7f76   tacacs: various fixes and cleanups.
     add  2ce378f   packet_xml: detect and handle UTF-16 BOM


Summary of changes:
 epan/dissectors/packet-xml.c | 55 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 50 insertions(+), 5 deletions(-)