summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-09-22 14:22:34 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-09-22 14:22:34 +0200
commit44844b8af3be216cec340c8ff83fdc6f1d6f1fff (patch)
treed54ec79162eef211334e9d67a40e38de8ae93d06 /runtime
parent4cc2db490a27e4da95f821bcf5eef5c3b281fe17 (diff)
downloadrsyslog-44844b8af3be216cec340c8ff83fdc6f1d6f1fff.tar.gz
rsyslog-44844b8af3be216cec340c8ff83fdc6f1d6f1fff.tar.xz
rsyslog-44844b8af3be216cec340c8ff83fdc6f1d6f1fff.zip
minor: increased buffer size to be safe in all cases
if the buffer was too small, we would see more API calls, but no failure, so this is no fix!
Diffstat (limited to 'runtime')
-rw-r--r--runtime/stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index e8d4a2a0..32467082 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -607,8 +607,9 @@ static rsRetVal strmConstructFinalize(strm_t *pThis)
} else {
/* we use the same size as the original buf, as we would like
* to make sure we can write out everything with a SINGLE api call!
+ * We add another 128 bytes to take care of the gzip header and "all eventualities".
*/
- CHKmalloc(pThis->pZipBuf = (Bytef*) malloc(sizeof(uchar) * pThis->sIOBufSize));
+ CHKmalloc(pThis->pZipBuf = (Bytef*) malloc(sizeof(uchar) * pThis->sIOBufSize + 128));
}
}
@@ -854,7 +855,6 @@ dbgprintf("XXX: doAsyncWriteInternal: strm %p, len %ld\n", pThis, (long) lenBuf)
if(++pThis->iCnt == 1)
pthread_cond_signal(&pThis->notEmpty);
-finalize_it:
RETiRet;
}