diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-16 17:02:49 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-03-16 17:02:49 +0100 |
commit | 219336ec5a560a472f7b4e1d60a42e13685e9a5c (patch) | |
tree | 64c4f4ef90997d845dff15b3ff2b24f033af0da0 | |
parent | 4cb3e80152ed4674ed370915f7c02889b5bfb6f3 (diff) | |
download | rsyslog-219336ec5a560a472f7b4e1d60a42e13685e9a5c.tar.gz rsyslog-219336ec5a560a472f7b4e1d60a42e13685e9a5c.tar.xz rsyslog-219336ec5a560a472f7b4e1d60a42e13685e9a5c.zip |
bugfix: recent patch to fix small memory leak could cause invalid free.
This could only happen during config file parsing.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | plugins/omgssapi/omgssapi.c | 4 | ||||
-rw-r--r-- | tools/omfwd.c | 4 |
3 files changed, 6 insertions, 4 deletions
@@ -20,6 +20,8 @@ Version 4.6.2 [v4-stable] (rgerhards), 2010-03-?? in proper retries. - bugfix: $omfileFlushOnTXEnd was turned on when set to off and vice versa due to an invalid check +- bugfix: recent patch to fix small memory leak could cause invalid free. + This could only happen during config file parsing. - bugfix(minor): handling of extremely large strings in dbgprintf() fixed Previously, it could lead to garbagge output and, in extreme cases, also to segfaults. Note: this was a problem only when debug output was diff --git a/plugins/omgssapi/omgssapi.c b/plugins/omgssapi/omgssapi.c index d9f80c14..782ac22f 100644 --- a/plugins/omgssapi/omgssapi.c +++ b/plugins/omgssapi/omgssapi.c @@ -377,7 +377,7 @@ CODESTARTtryResume ENDtryResume BEGINdoAction - char *psz; /* temporary buffering */ + char *psz = NULL; /* temporary buffering */ register unsigned l; int iMaxLine; CODESTARTdoAction @@ -454,7 +454,7 @@ CODESTARTdoAction } finalize_it: # ifdef USE_NETZIP - if(psz != (char*) ppString[0]) { + if((psz != NULL) && (psz != (char*) ppString[0])) { /* we need to free temporary buffer, alloced above - Naoya Nakazawa, 2010-01-11 */ free(psz); } diff --git a/tools/omfwd.c b/tools/omfwd.c index a6d83eb9..cbfc36a4 100644 --- a/tools/omfwd.c +++ b/tools/omfwd.c @@ -411,7 +411,7 @@ CODESTARTtryResume ENDtryResume BEGINdoAction - char *psz; /* temporary buffering */ + char *psz = NULL; /* temporary buffering */ register unsigned l; int iMaxLine; CODESTARTdoAction @@ -487,7 +487,7 @@ CODESTARTdoAction } finalize_it: # ifdef USE_NETZIP - if(psz != (char*) ppString[0]) { + if((psz != NULL) && (psz != (char*) ppString[0])) { /* we need to free temporary buffer, alloced above - Naoya Nakazawa, 2010-01-11 */ free(psz); } |