Wireshark-commits: [Wireshark-commits] master-2.6 9518aaa: Use proto_tree_add_expert{_format}() to

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 08 Jun 2018 05:00:59 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9518aaa254243e4cc637287218aaa2bc3fd63e87
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark

Commits:

9518aaa by Guy Harris (guy@xxxxxxxxxxxx):

    Use proto_tree_add_expert{_format}() to report errors.
    
    Don't create fake string items.
    
    Have the item cover the part of the packet that has the issue, e.g. if
    there's an unexpected identifier, or an invalid length, cover that
    rather than the value; that 1) shows where the problem is and 2) avoids
    throwing an exception.
    
    Clean up the error messages and expert info items while we're at it.
    
    Change-Id: If698db98158f7a5532a865be02f1028d92af262f
    Reviewed-on: https://code.wireshark.org/review/28093
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 0a9e92d585a3b8a42aff8ad968710ea1d6a4e7ff)
    Reviewed-on: https://code.wireshark.org/review/28094
    

Actions performed:

    from  6bc74bd   Qt: Set the ByteViewText field and protocol foreground.
    adds  9518aaa   Use proto_tree_add_expert{_format}() to report errors.


Summary of changes:
 epan/dissectors/packet-ber.c | 450 +++++++++++++++++++++++++------------------
 1 file changed, 259 insertions(+), 191 deletions(-)