aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff_zlib.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-25Fix buffer overrun in zlib decompressionPeter Wu1-3/+6
After updating next_in (to remove the gzip header), avail_in must also be updated. Failing to do makes zlib read past the input buffer. In theory this would resukt in a buffer overrun of at most double the input length, in practice zlib returns as soon as the compression fails (after reading a few bytes). Bug: 11548 Change-Id: If71691a2846338f46d866964a77cc4e74a9b61dd Reviewed-on: https://code.wireshark.org/review/12038 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2014-12-11skip the extra field in the gzip headerMartin Kaiser1-5/+19
it consists of two bytes xsize + xsize bytes of data use an unsigned type for xsize fail gracefully if the field is present but truncated tvb_length_remaining > tvb_captured_length_remaining Change-Id: I7f5138743c2d88abdd4f5f18d3c0292612ddb559 Reviewed-on: https://code.wireshark.org/review/5654 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-07make our counting a bit clearerMartin Kaiser1-2/+4
Change-Id: Ie64573f5a0b6e921a5011e487eea8e55f72b9a0b Reviewed-on: https://code.wireshark.org/review/5653 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-12-07don't initialize variables if the first thing we do is assign aMartin Kaiser1-6/+6
different value to them Change-Id: I719db9180b2ba5f21653086f2697ca9bac68d6b1 Reviewed-on: https://code.wireshark.org/review/5652 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-12-07make sure that we don't read past the end of the compressed bufferMartin Kaiser1-6/+8
Bug: 10757 Change-Id: I30054c4a75ec86ea603cf78b702be5255c35f549 Reviewed-on: https://code.wireshark.org/review/5642 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-10Add editor modelines; Adjust whitespace as needed.Bill Meier1-0/+13
Change-Id: I3dc57f4c2ca57585103e3b71503ac4c332903e50 Reviewed-on: https://code.wireshark.org/review/4594 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-06Move tvb_uncompress() to tvbuff_zlib.cJakub Zawadzki1-0/+323
svn path=/trunk/; revision=53815