When trying to handle gzip-compressed data, don't seek past the end of our

compressed data buffer.  Fixes bug 288.

svn path=/trunk/; revision=14981
This commit is contained in:
Gerald Combs 2005-07-21 21:40:57 +00:00
parent 0ca30abe65
commit c9bc1edd92
1 changed files with 6 additions and 0 deletions

View File

@ -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);