From 89e18de662ef563e58eb04f51f2966efcd4c3fab Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 13 Jul 2009 14:24:16 +0200 Subject: bugfix: sending syslog messages with zip compression did not work --- tools/omfwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/omfwd.c') 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, -- cgit From ef9722ec87c8a7ddb2d499c1e7863475d8790a94 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 13 Jul 2009 15:44:09 +0200 Subject: fix compile error in zip sender patch ... at least I was smart enough to remind me that I did not do one test ;) That reminder was the compiler error. Now removed and test done ;) [simple things tend to work, lol] --- tools/omfwd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/omfwd.c') diff --git a/tools/omfwd.c b/tools/omfwd.c index b6565dd1..eb023344 100644 --- a/tools/omfwd.c +++ b/tools/omfwd.c @@ -411,11 +411,11 @@ CODESTARTdoAction */ if(pData->compressionLevel && (l > MIN_SIZE_FOR_COMPRESS)) { Bytef *out; - teste das hier! uLongf destLen = iMaxLine + iMaxLine/100 +12; /* recommended value from zlib doc */ + 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(destlen)); + CHKmalloc(out = (Bytef*) malloc(destLen)); out[0] = 'z'; out[1] = '\0'; ret = compress2((Bytef*) out+1, &destLen, (Bytef*) psz, -- cgit