
Pages:<< prev 1 next >>


Off the Edge of the Map

GroupAdministrators
Posts1,199
JoinedMar 21, 2006
Bug: compressEnd doesn't handle itself very well.
Danger: Medium - Could contribute to rare issue of compressed streams becoming corrupted.
Found by: Nick Gammon
Fixed by: Nick Gammon
---
mccp.c
Replace the compressEnd function with:
Danger: Medium - Could contribute to rare issue of compressed streams becoming corrupted.
Found by: Nick Gammon
Fixed by: Nick Gammon
---
mccp.c
Replace the compressEnd function with:
bool compressEnd( DESCRIPTOR_DATA * d ) { unsigned char dummy[1]; if( !d->mccp->out_compress ) return TRUE; d->mccp->out_compress->avail_in = 0; d->mccp->out_compress->next_in = dummy; if( deflate( d->mccp->out_compress, Z_FINISH ) == Z_STREAM_END ) process_compressed( d ); /* try to send any residual data */ deflateEnd( d->mccp->out_compress ); DISPOSE( d->mccp->out_compress_buf ); DISPOSE( d->mccp->out_compress ); return TRUE; }
Pages:<< prev 1 next >>