Wireshark-commits: [Wireshark-commits] master 72af485: dcerpc: don't THROW() an exception from a di

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 13 Jun 2016 22:21:55 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=72af485d4ec5f9e4936749fe63d781f750b32bdf
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

72af485 by Martin Kaiser (wireshark@xxxxxxxxx):

    dcerpc: don't THROW() an exception from a dissector
    
    remove the checks in dissect_ndr_ucarray_core() where a block or bytes
    dissection function is called and an exception is thrown if the offset
    wraps around, i.e. the final offset is lower than the initial one
    
    the block functions eventually call proto_tree_add_item(), which throws
    an exception if necessary
    
    the bytes functions end up calling functions to dissect basic types.
    insert calls to tvb_ensure_bytes_exist() if those functions increase our
    offset without reading data.  thus, an exception is thrown if there's an
    overflow.
    
    remove some unnecessary if (tree) checks while at it
    
    Change-Id: I8006399ae20934daeec231246debe247f8dedbf0
    Reviewed-on: https://code.wireshark.org/review/15832
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  551b824   Add proto_tree_add_bitmask_list_value.
    adds  72af485   dcerpc: don't THROW() an exception from a dissector


Summary of changes:
 epan/dissectors/packet-dcerpc.c |   29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)