Wireshark-commits: [Wireshark-commits] master-3.0 21963b9: TLS: fix DISSECTOR_ASSERT for zero-lengt

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 15 May 2019 21:37:09 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=21963b9c0bdc253306bb529004bcd59c499161c3
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master-3.0
Repository: wireshark

Commits:

21963b9 by Peter Wu (peter@xxxxxxxxxxxxx):

    TLS: fix DISSECTOR_ASSERT for zero-length records fragments
    
    When decrypt_ssl3_record is called with a record length of zero, it will
    pass NULL to ssl_data_set because tvb_get_ptr(..., 0) yields NULL. That
    triggers a DISSECTOR_ASSERT. Fix this and add expert info while at it.
    
    Bug: 15780
    Change-Id: I727b511aa48b6e1aeb20a441d1eb9d3627a74413
    Reviewed-on: https://code.wireshark.org/review/33203
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    (cherry picked from commit ab1a7cc4a5dc5435df50cc480d1f0ae8ad06ee65)
    Reviewed-on: https://code.wireshark.org/review/33212
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  13b8e41   mmdbresolve: Improve our main loop check.
     add  21963b9   TLS: fix DISSECTOR_ASSERT for zero-length records fragments


Summary of changes:
 epan/dissectors/packet-dtls.c      |  2 +-
 epan/dissectors/packet-tls-utils.c | 17 +++++++++++++++++
 epan/dissectors/packet-tls-utils.h |  3 ++-
 epan/dissectors/packet-tls.c       |  9 ++++++---
 4 files changed, 26 insertions(+), 5 deletions(-)