Refix the off-by-one that wasn't off-by-one.

This commit is contained in:
Con Kolivas 2010-11-18 23:36:17 +11:00
parent 591d791791
commit fa757007d6

View file

@ -717,7 +717,7 @@ void *open_stream_out(int f, int n, i64 limit)
* ram. We need enough for the 2 streams and for the compression * ram. We need enough for the 2 streams and for the compression
* backend at most, being conservative. */ * backend at most, being conservative. */
retest_malloc: retest_malloc:
testmalloc = malloc(sinfo->bufsize * (n + 2)); testmalloc = malloc(sinfo->bufsize * (n + 1));
if (!testmalloc) { if (!testmalloc) {
sinfo->bufsize = sinfo->bufsize / 10 * 9; sinfo->bufsize = sinfo->bufsize / 10 * 9;
goto retest_malloc; goto retest_malloc;