summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-13 14:24:16 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-13 14:24:16 +0200
commit89e18de662ef563e58eb04f51f2966efcd4c3fab (patch)
tree7f84c61c354ce5f32f490ceed698c5c4b74bf9d4
parent538543f6d0d4f279301bccf9a9c05ea6a02230a4 (diff)
downloadrsyslog-89e18de662ef563e58eb04f51f2966efcd4c3fab.tar.gz
rsyslog-89e18de662ef563e58eb04f51f2966efcd4c3fab.tar.xz
rsyslog-89e18de662ef563e58eb04f51f2966efcd4c3fab.zip
bugfix: sending syslog messages with zip compression did not work
-rw-r--r--ChangeLog3
-rw-r--r--tools/omfwd.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7e4d492f..6f3cbccf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
---------------------------------------------------------------------------
+Version 3.22.2 [v3-stable] (rgerhards), 2009-07-??
+- bugfix: sending syslog messages with zip compression did not work
+---------------------------------------------------------------------------
Version 3.22.1 [v3-stable] (rgerhards), 2009-07-02
- bugfix: invalid error message issued if $inlcudeConfig was on an empty
set of files (e.g. *.conf, where none such files existed)
diff --git a/tools/omfwd.c b/tools/omfwd.c
index e62f84b7..b6565dd1 100644
--- a/tools/omfwd.c
+++ b/tools/omfwd.c
@@ -411,11 +411,11 @@ CODESTARTdoAction
*/
if(pData->compressionLevel && (l > MIN_SIZE_FOR_COMPRESS)) {
Bytef *out;
- uLongf destLen = sizeof(out) / sizeof(Bytef);
+ teste das hier! uLongf destLen = iMaxLine + iMaxLine/100 +12; /* recommended value from zlib doc */
uLong srcLen = l;
int ret;
/* TODO: optimize malloc sequence? -- rgerhards, 2008-09-02 */
- CHKmalloc(out = (Bytef*) malloc(iMaxLine + iMaxLine/100 + 12));
+ CHKmalloc(out = (Bytef*) malloc(destlen));
out[0] = 'z';
out[1] = '\0';
ret = compress2((Bytef*) out+1, &destLen, (Bytef*) psz,