summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRisto Laanoja <ristik@gmail.com>2013-06-25 14:09:40 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2013-06-25 14:09:40 +0200
commitabdbe863cc08c63ea5acc016ae84d85b2695f7f9 (patch)
tree2a744db1885cb6c78a7ea4d16fb0b075076e4828
parentbb22ba16d69eada5910a6ce604387ad35f0d9d4a (diff)
downloadrsyslog-abdbe863cc08c63ea5acc016ae84d85b2695f7f9.tar.gz
rsyslog-abdbe863cc08c63ea5acc016ae84d85b2695f7f9.tar.bz2
rsyslog-abdbe863cc08c63ea5acc016ae84d85b2695f7f9.zip
bugfix: lmsig_gt abort on invalid configuration parameters
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=448
-rw-r--r--ChangeLog3
-rw-r--r--runtime/lmsig_gt.c12
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 097cdfcc..faa07896 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,9 @@ Version 7.4.2 [v7.4-stable] 2013-06-??
- bugfix: small memory leak when $uptime property was used
- bugfix: potential segfault on rsyslog termination in imudp
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=456
+- bugfix: lmsig_gt abort on invalid configuration parameters
+ closes: http://bugzilla.adiscon.com/show_bug.cgi?id=448
+ Thanks to Risto Laanoja for the patch.
- imtcp: fix typo in "listner" parameter, which is "listener"
Currently, both names are accepted.
- solved build problems on FreeBSD
diff --git a/runtime/lmsig_gt.c b/runtime/lmsig_gt.c
index e9194c76..30879dd4 100644
--- a/runtime/lmsig_gt.c
+++ b/runtime/lmsig_gt.c
@@ -89,7 +89,13 @@ SetCnfParam(void *pT, struct nvlst *lst)
int i;
uchar *cstr;
struct cnfparamvals *pvals;
+ DEFiRet;
pvals = nvlstGetParams(lst, &pblk, NULL);
+ if(pvals == NULL) {
+ errmsg.LogError(0, RS_RET_MISSING_CNFPARAMS,
+ "lmsig_gt: error processing sig. parameters\n");
+ ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
+ }
if(Debug) {
dbgprintf("sig param blk in lmsig_gt:\n");
cnfparamsPrint(&pblk, pvals);
@@ -120,8 +126,10 @@ SetCnfParam(void *pT, struct nvlst *lst)
"param '%s'\n", pblk.descr[i].name);
}
}
- cnfparamvalsDestruct(pvals, &pblk);
- return RS_RET_OK;
+finalize_it:
+ if(pvals != NULL)
+ cnfparamvalsDestruct(pvals, &pblk);
+ RETiRet;
}