From fa757007d60985b305fab88f10b1c93ead926e8d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 18 Nov 2010 23:36:17 +1100 Subject: [PATCH] Refix the off-by-one that wasn't off-by-one. --- stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream.c b/stream.c index 309e6ef..6ee0fed 100644 --- a/stream.c +++ b/stream.c @@ -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 * backend at most, being conservative. */ retest_malloc: - testmalloc = malloc(sinfo->bufsize * (n + 2)); + testmalloc = malloc(sinfo->bufsize * (n + 1)); if (!testmalloc) { sinfo->bufsize = sinfo->bufsize / 10 * 9; goto retest_malloc;