Wireshark-commits: [Wireshark-commits] master-2.6 730003d: Add some length checks, remove a DISSECT
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 12 Jun 2018 21:31:56 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=730003d6eb3a194a996f39475ad5788622bbbabd
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark

Commits:

730003d 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/28241
    

Actions performed:

    from  c13063a   BT Common: fix btcommon.eir_ad.entry.le_role filter
    adds  730003d   Add some length checks, remove a DISSECTOR_ASSERT().


Summary of changes:
 epan/crypt/dot11decrypt.c     | 80 +++++++++++++++++++++++++++++++++++++------
 epan/crypt/dot11decrypt_int.h |  7 +++-
 2 files changed, 76 insertions(+), 11 deletions(-)