|
@@ -246,7 +246,7 @@ static int z_compress(void *arg, unsigned char *rptr, unsigned char *obuf,
|
|
|
/*
|
|
/*
|
|
|
* See if we managed to reduce the size of the packet.
|
|
* See if we managed to reduce the size of the packet.
|
|
|
*/
|
|
*/
|
|
|
- if (olen < isize) {
|
|
|
|
|
|
|
+ if (olen < isize && olen <= osize) {
|
|
|
state->stats.comp_bytes += olen;
|
|
state->stats.comp_bytes += olen;
|
|
|
state->stats.comp_packets++;
|
|
state->stats.comp_packets++;
|
|
|
} else {
|
|
} else {
|