Wireshark-commits: [Wireshark-commits] master-2.4 96af0ad: Add some length checks, remove a DISSECT

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 12 Jun 2018 21:46:03 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=96af0adebb0b18d947227c8e10cf61a29c36a0f2
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.4
Repository: wireshark

Commits:

96af0ad by Guy Harris (guy@xxxxxxxxxxxx):

    Add some length checks, remove a DISSECTOR_ASSERT().
    
    Do more checks to make sure we don't run past the end of the data we're
    handed, and don't do a DISSECTOR_ASSERT(), as there may well be packets
    that don't have enough data to pass the assertion - that was causing
    some errors to show up in the 2.6 buildbot when doing 802.11 decryption
    tests.  Those errors should instead be reported as "sorry, we can't do
    decryption" errors by the decryption code.
    
    (XXX - the 802.11 *dissector* should probably be extracting the relevant
    fields and doing the relevant checks, and hand the data to the
    decryption code, so that we don't duplicate 802.11 frame parsing with
    code that might not do as much necessary work as the 802.11 dissector.)
    
    Tweak some comments while we're at it.
    
    Change-Id: I1d230e07cec2fca8c23f265b5875a0bf83f79432
    Reviewed-on: https://code.wireshark.org/review/28240
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 871e96462750b616ad8cc1063c84b844c1a8bfc4)
    Reviewed-on: https://code.wireshark.org/review/28242
    

Actions performed:

    from  dcc0f48   BT Common: fix btcommon.eir_ad.entry.le_role filter
    adds  96af0ad   Add some length checks, remove a DISSECTOR_ASSERT().


Summary of changes:
 epan/crypt/airpdcap.c     | 81 +++++++++++++++++++++++++++++++++++++++++------
 epan/crypt/airpdcap_int.h |  7 +++-
 2 files changed, 78 insertions(+), 10 deletions(-)