diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | tools/omfwd.c | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -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, |