diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-08 13:07:47 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-08 13:07:47 +0100 |
commit | 84f959d4f0dfb6a9e1dda43e17a97402b55d3314 (patch) | |
tree | 3d0d49eebd701cbc1690501688794f7eddbc7696 /runtime/msg.c | |
parent | 7febb07e2a587c0646c155796ed1fa91f89682fb (diff) | |
parent | bbb2066d17824f366d0f83a010cae6ebe99d4fa0 (diff) | |
download | rsyslog-84f959d4f0dfb6a9e1dda43e17a97402b55d3314.tar.gz rsyslog-84f959d4f0dfb6a9e1dda43e17a97402b55d3314.tar.bz2 rsyslog-84f959d4f0dfb6a9e1dda43e17a97402b55d3314.zip |
Merge branch 'v7-stable'
Diffstat (limited to 'runtime/msg.c')
-rw-r--r-- | runtime/msg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index 86805af1..cf72892e 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -3218,6 +3218,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) { |