summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-09-04 15:32:00 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-09-04 15:32:00 +0000
commita92017cfc7b41989d87287f62df3451accce400c (patch)
treecc2586393bf091c069f22e448ff5365422cdaeb0 /template.c
parent25dfb161a68038fae8de505df3e2350a450b1ee2 (diff)
downloadrsyslog-a92017cfc7b41989d87287f62df3451accce400c.tar.gz
rsyslog-a92017cfc7b41989d87287f62df3451accce400c.tar.xz
rsyslog-a92017cfc7b41989d87287f62df3451accce400c.zip
- fixed bug: a template like this causes an infinite loop: $template
opts,"%programname:::a,b%" thanks varmojfekoj for the patch - fixed bug: case changing options crash freeing the string pointer because they modify it: $template opts2,"%programname::1:lowercase%" thanks varmojfekoj for the patch
Diffstat (limited to 'template.c')
-rw-r--r--template.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/template.c b/template.c
index 7f9c70f0..91c24b24 100644
--- a/template.c
+++ b/template.c
@@ -420,6 +420,8 @@ static void doOptions(unsigned char **pp, struct templateEntry *pTpe)
/* check if we need to skip oversize option */
while(*p && *p != '%' && *p != ',')
++p; /* just skip */
+ if(*p == ',')
+ ++p; /* eat ',' */
/* OK, we got the option, so now lets look what
* it tells us...
*/