Wireshark-commits: [Wireshark-commits] master-3.2 73c5fff: WireGuard: fix null pointer crash
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 25 Feb 2020 12:36:38 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=73c5fff899f253c44a72657048aec7db6edee571
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master-3.2
Repository: wireshark

Commits:

73c5fff by Peter Wu (peter@xxxxxxxxxxxxx):

    WireGuard: fix null pointer crash
    
    It was assumed that the WireGuard dissector is always called on the
    first pass before the second pass. That might not be the case when the
    heuristics dissector sets a conversation dissector later in the stream.
    Be prepared to handle this case. Do not simply abort, the previous
    packets may be valid data messages.
    
    Bug: 16394
    Change-Id: Id5bf38c07f4d1bffd4b372e92d9a8784e094829a
    Reviewed-on: https://code.wireshark.org/review/36148
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
    (cherry picked from commit b2ee7a2876c26b71f50cd0808c89af6a8483f007)
    Reviewed-on: https://code.wireshark.org/review/36159
    Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
    

Actions performed:

    from  79769da   EAP: Remove a couple of string length assumptions.
     add  73c5fff   WireGuard: fix null pointer crash


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