Try limiting stream_read in unzip_literal and just returning how much was read.

This commit is contained in:
Con Kolivas 2011-02-10 16:57:22 +11:00
parent 9a3bfe33d1
commit 3879807865
2 changed files with 10 additions and 6 deletions

View file

@ -1259,7 +1259,7 @@ i64 read_stream(void *ss, int stream, uchar *p, i64 len)
while (len) {
i64 n;
n = MIN(sinfo->s[stream].buflen-sinfo->s[stream].bufp, len);
n = MIN(sinfo->s[stream].buflen - sinfo->s[stream].bufp, len);
if (n > 0) {
memcpy(p, sinfo->s[stream].buf + sinfo->s[stream].bufp, n);