diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-07-21 21:40:57 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-07-21 21:40:57 +0000 |
commit | 1d0d1bd3e07f941512f8e629390b2a6ab86c491b (patch) | |
tree | 064aef60ca5dd0e00510e66d7527488c8e74804b /epan/tvbuff.c | |
parent | 8cb2bd149d04d2386a0c522e97ef4669564f5585 (diff) |
When trying to handle gzip-compressed data, don't seek past the end of our
compressed data buffer. Fixes bug 288.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14981 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index aff4825cad..e3878bf76e 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -2408,6 +2408,12 @@ tvb_uncompress(tvbuff_t *tvb, int offset, int comprlen) inflateReset(strm); next = c; strm->next_in = next; + if (c - compr > comprlen) { + g_free(strm); + g_free(compr); + g_free(strmbuf); + return NULL; + } comprlen -= (c - compr); err = inflateInit2(strm, wbits); |