Wireshark-commits: [Wireshark-commits] lts-1.2.11 c15f686: Add some additional checks in SnifferDec
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sun, 16 Nov 2014 18:59:58 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=c15f686838866b736b807d0dd5902d07952e58d5
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: lts-1.2.11
Repository: wireshark

Commits:

c15f686 by Guy Harris (guy@xxxxxxxxxxxx):

    Add some additional checks in SnifferDecompress().
    
    Check the input pointer in the while clause of the loop, so that we
    handle an empty input buffer.
    
    When reading a bit mask, check before fetching the bit mask that we have
    two bytes of bit mask and the byte after it.
    
    Before putting an uncompressed input byte into the output, make sure we
    wouldn't run past the end of the output buffer.
    
    Before copying an earlier string from the output buffer, make sure it
    doesn't run past the end of the data we've decompressed so far.
    
    Conflicts:
    	wiretap/ngsniffer.c
    
    Bug: 10461
    Change-Id: I8bb8d0d291368ae8bf0ac26970ff54d3262a7e6e
    Reviewed-on: https://code.wireshark.org/review/4083
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    (cherry picked from commit 47c592938ba9f0caeacc4c2ccadb370e72f293a2)
    Reviewed-on: https://code.wireshark.org/review/4085
    Reviewed-on: https://code.wireshark.org/review/4438
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    

Actions performed:

    from  64a2c93   ses: initialize pres_ctx_id in session struct
    adds  c15f686   Add some additional checks in SnifferDecompress().


Summary of changes:
 wiretap/ngsniffer.c |   39 +++++++++++++++++++++++++++++----------
 1 file changed, 29 insertions(+), 10 deletions(-)