blob: f973633d34d8aac1644575c7535399c128960005 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$NetBSD: patch-aa,v 1.1 2001/12/30 16:49:41 taca Exp $
--- zlib.c.orig Tue Sep 26 14:47:02 2000
+++ zlib.c
@@ -274,8 +274,9 @@
memmove(RSTRING(z->buf)->ptr, RSTRING(z->buf)->ptr + len,
z->buf_filled);
z->stream.next_out = RSTRING(z->buf)->ptr + z->buf_filled;
- z->stream.avail_out = (z->buf_filled < ZSTREAM_AVAIL_OUT_STEP) ?
- z->buf_filled : ZSTREAM_AVAIL_OUT_STEP;
+ z->stream.avail_out = RSTRING(z->buf)->len - z->buf_filled;
+ if (z->stream.avail_out > ZSTREAM_AVAIL_OUT_STEP)
+ z->stream.avail_out = ZSTREAM_AVAIL_OUT_STEP;
return dst;
}
|