diff options
author | Andre Lorbach <alorbach@adiscon.com> | 2011-08-05 14:09:08 +0200 |
---|---|---|
committer | Andre Lorbach <alorbach@adiscon.com> | 2011-08-05 14:09:08 +0200 |
commit | a3953fbee90045b96bd5ef44b64883a6bff57fee (patch) | |
tree | f89f77d1a51189c6e131b4a13a1d6faeb346b20f | |
parent | 1234d7c8cd5d76862510cff315ea965c4f978e55 (diff) | |
parent | 3229fbeb1e1183141cbf2508334a52f6a082c40b (diff) | |
download | rsyslog-a3953fbee90045b96bd5ef44b64883a6bff57fee.tar.gz rsyslog-a3953fbee90045b96bd5ef44b64883a6bff57fee.tar.xz rsyslog-a3953fbee90045b96bd5ef44b64883a6bff57fee.zip |
Merge branch 'v3-stable' into v4-stable
Conflicts:
runtime/msg.c
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | runtime/msg.c | 14 |
2 files changed, 11 insertions, 7 deletions
@@ -1,4 +1,7 @@ --------------------------------------------------------------------------- +Version 4.6.8 [v4-stable] (rgerhards), 2011-??-?? +- bugfix: potential misadressing in property replacer +--------------------------------------------------------------------------- Version 4.6.7 [v4-stable] (rgerhards), 2011-07-11 - added support for the ":omusrmsg:" syntax in configuring user messages - added support for the ":omfile:" syntax in configuring user messages @@ -699,6 +702,7 @@ Version 3.22.4 [v3-stable] (rgerhards), 2010-??-?? offset closes: http://bugzilla.adiscon.com/show_bug.cgi?id=271 - improved some code based on clang static analyzer results +- bugfix: potential misadressing in property replacer --------------------------------------------------------------------------- Version 3.22.3 [v3-stable] (rgerhards), 2010-11-24 - bugfix(important): problem in TLS handling could cause rsyslog to loop diff --git a/runtime/msg.c b/runtime/msg.c index a9a09143..0dbcdefd 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -2818,7 +2818,13 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, } /* check for "." and ".." (note the parenthesis in the if condition!) */ - if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) { + if(*pRes == '\0') { + if(*pbMustBeFreed == 1) + free(pRes); + pRes = UCHAR_CONSTANT("_"); + bufLen = 1; + *pbMustBeFreed = 0; + } else if((*pRes == '.') && (*(pRes + 1) == '\0' || (*(pRes + 1) == '.' && *(pRes + 2) == '\0'))) { uchar *pTmp = pRes; if(*(pRes + 1) == '\0') @@ -2828,12 +2834,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, if(*pbMustBeFreed == 1) free(pTmp); *pbMustBeFreed = 0; - } else if(*pRes == '\0') { - if(*pbMustBeFreed == 1) - free(pRes); - pRes = UCHAR_CONSTANT("_"); - bufLen = 1; - *pbMustBeFreed = 0; } } |