Wireshark-commits: [Wireshark-commits] lts-1.8.2 f69d9d2: Do bounds checking when decompressing WCP
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 23 Mar 2015 09:44:51 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f69d9d2a59477cd1d2f3747b57abce1b29a6a40c
Submitter: Balint Reczey (balint@xxxxxxxxxxxxxxx)
Changed: branch: lts-1.8.2
Repository: wireshark

Commits:

f69d9d2 by Guy Harris (guy@xxxxxxxxxxxx):

    Do bounds checking when decompressing WCP packets.
    
    Extract the data offset and count only once, and make sure we don't run
    past the end of the data we've copied from the packet; have
    decompressed_entry() just do the decompression, rather than also
    fetching the data offset and count.
    
    Add some comments while we're at it.
    
    I have basically copied the new code except for the whitespaces
    instead of just back-porting the changes because the changes were
    an almost full rewrite already.
    
    Bug: 10844
    Change-Id: I2dc2f9594422ffa8f15fd5c57c9dac2e30e363f4
    Reviewed-on: https://code.wireshark.org/review/6514
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit b204ff4846fe84b7789893c6b1d9afbdecac5b5d)
    Reviewed-on: https://code.wireshark.org/review/6515
    Reviewed-on: https://code.wireshark.org/review/7712
    Reviewed-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
    Tested-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
    

Actions performed:

    from  beca96a   Pcapng: Don't fetch past the end of a GArray.
    adds  f69d9d2   Do bounds checking when decompressing WCP packets.


Summary of changes:
 epan/dissectors/packet-wcp.c |  185 +++++++++++++++++++++++++++---------------
 1 file changed, 120 insertions(+), 65 deletions(-)