diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | runtime/msg.c | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -10,6 +10,9 @@ Version 7.2.5 [v7-stable] 2013-01-?? shutdown phase*. This affected only the LAST batches being processed. No problem existed during the regular run. Could usually only happen on very busy systems, which were still busy during shutdown. +- bugfix: very large memory consumption (and probably out of memory) when + FromPos was specified in template, but ToPos not. + Thanks to Radu Gheorghe for alerting us of this bug. ---------------------------------------------------------------------------- Version 7.2.4 [v7-stable] 2012-12-07 - enhance: permit RFC3339 timestamp in local log socket messages diff --git a/runtime/msg.c b/runtime/msg.c index 09f6d649..10605ba4 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -3027,6 +3027,8 @@ uchar *MsgGetProp(msg_t *pMsg, struct templateEntry *pTpe, */ ; /*DO NOTHING*/ } else { + if(iTo > bufLen) /* iTo is very large, if no to-position is set in the template! */ + iTo = bufLen; iLen = iTo - iFrom + 1; /* the +1 is for an actual char, NOT \0! */ pBufStart = pBuf = MALLOC((iLen + 1) * sizeof(char)); if(pBuf == NULL) { |