summaryrefslogtreecommitdiffstats
path: root/runtime/msg.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-31 16:21:58 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-31 16:21:58 +0200
commit302ad02e7781892856c1cacaf98a87f90db9571c (patch)
tree0f3763df366549cf0da9671378ae1a3e4d5040fb /runtime/msg.c
parente3b469befafe9fa55413eb8a7df35c120670c9bf (diff)
downloadrsyslog-302ad02e7781892856c1cacaf98a87f90db9571c.tar.gz
rsyslog-302ad02e7781892856c1cacaf98a87f90db9571c.tar.xz
rsyslog-302ad02e7781892856c1cacaf98a87f90db9571c.zip
temporary bugfix replaced by permanent one for...
...message-induced off-by-one error (potential segfault) (see 4.6.2) The analysis has been completed and a better fix been crafted and integrated.
Diffstat (limited to 'runtime/msg.c')
-rw-r--r--runtime/msg.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/runtime/msg.c b/runtime/msg.c
index 2ce7843a..91057f97 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -2010,6 +2010,8 @@ finalize_it:
/* set raw message in message object. Size of message is provided.
+ * The function makes sure that the stored rawmsg is properly
+ * terminated by '\0'.
* rgerhards, 2009-06-16
*/
void MsgSetRawMsg(msg_t *pThis, char* pszRawMsg, size_t lenMsg)
@@ -2319,13 +2321,6 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe,
*pPropLen = sizeof("**INVALID PROPERTY NAME**") - 1;
return UCHAR_CONSTANT("**INVALID PROPERTY NAME**");
}
- /* the following line fixes the symptom, but not the root cause -- at least MSG sometimes
- * returns a size of one too less. To prevent all troubles, we recalculate the sizes based
- * on what we actually got. TODO: remove once root cause is found.
- * rgerhards, 2010-03-23
- */
- bufLen = ustrlen(pRes);
-
/* If we did not receive a template pointer, we are already done... */
if(pTpe == NULL) {