Wireshark-commits: [Wireshark-commits] master-2.6 a5c23f1: rtmpt: fix dissection of multiple packet

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 12 May 2018 08:29:45 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=a5c23f1d1f79386a3def075dcb9ac8912812b93b
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master-2.6
Repository: wireshark

Commits:

a5c23f1 by Peter Wu (peter@xxxxxxxxxxxxx):

    rtmpt: fix dissection of multiple packets on second pass
    
    The previous fix for the infinite loop in bug 13347 resulted in loop
    termination after one round, resulting in ignoring all but the last
    packet in a TCP segment.
    
    Observe that the purpose of this loop is to collect all packets where
    "tp->seq" refers to the first offset and "tcp->lastseq" refers to the
    last position of the packet. If a full packet "tp" is found, then the
    previous packet ends at "tp->seq-1" instead of "tp->lastseq-1" (assuming
    no overlapping TCP segments).
    
    The infinite loop from bug 13347 occured because of a single packet of
    length 1 (tp->seq=0, tp->lastseq=0) and lastseq-1 overflowed. To address
    that, terminate the loop once the begin is reached (tp->seq == 0).
    
    Bug: 14650
    Change-Id: Ibef382a09c6481b1024dd64dbc8bde904025f057
    Fixes: v2.3.0rc0-2153-gee185445f4 ("rtmpt: Ensure sequence count is incremented for stored fragments")
    Reviewed-on: https://code.wireshark.org/review/27319
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    (cherry picked from commit 16a52bff6cf8ddfec8126bd40c50b65465ede0cd)
    Reviewed-on: https://code.wireshark.org/review/27467
    

Actions performed:

    from  8bb13b6   Add missing image file to distribution tarball
    adds  a5c23f1   rtmpt: fix dissection of multiple packets on second pass


Summary of changes:
 epan/dissectors/packet-rtmpt.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)