Wireshark-commits: [Wireshark-commits] master 728e5a1: packet-vnc.c: Improve re-assembly.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 20 Jun 2014 02:58:13 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=728e5a1ab3e2614ec83a6af43a52742cf0f5df01
Submitter: Bill Meier (wmeier@xxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

728e5a1 by Bill Meier (wmeier@xxxxxxxxxxx):

    packet-vnc.c: Improve re-assembly.
    
    Essentially:
    
      When more data is needed to continue dissecting a PDU, use
      DESEGMENT_ONE_MORE_SEGMENT instead of repeatedly requesting
      additional bytes (for one or a few more fields).
    
      - Improves the efficiency of the dissection;
    
      - Prevents 'one-pass' tshark dissection from redissecting
        the PDU repeatedly many, many times with each time dissecting
        the PDU with one or a few more additional fields.
        This generated *lots* of (repeated) output since a reassembled
        VNC PDU can contain many fields (each of short length).
    
      - (A comment in packet-tcp.c states, in effect, that repeatedly
         requesting a specific amount of more bytes to dissect a PDU
         will "break reassembly" although I note that the reassembly did
         seem to work (in-efficiently)).
    
    Note: Although this patch improves the handling of reassembly, the
          dissector has significant issues. For example. see Bug #5366.
    
    I expect this fixes the Bug #10134 issue: "Cannot allocate memory";
    
    Before the fix, 'tshark -nVxr' for the input file generated trees with
    multiple hundreds of thousands of entries and generated reassembled
    PDUs consisting of many, many small fragments.
    
    Change-Id: I970037c346fbaa4bffa5726fd5bee5f69396eabf
    Reviewed-on: https://code.wireshark.org/review/2471
    Reviewed-by: Bill Meier <wmeier@xxxxxxxxxxx>
    

Actions performed:

    from  0c3e1a2   Add casting and license info to fix buildbots
    adds  728e5a1   packet-vnc.c: Improve re-assembly.


Summary of changes:
 epan/dissectors/packet-vnc.c |   23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)