diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-06 07:39:33 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-06 07:39:33 +0200 |
commit | d275d116fcdcff14ff71642cf7b4f563a2b42eff (patch) | |
tree | 243bf72939cd65423325963cb9c34594272bd61a /runtime/modules.c | |
parent | c0e5c49526e011fa16d757f61ca9dd817ff35903 (diff) | |
download | rsyslog-d275d116fcdcff14ff71642cf7b4f563a2b42eff.tar.gz rsyslog-d275d116fcdcff14ff71642cf7b4f563a2b42eff.tar.bz2 rsyslog-d275d116fcdcff14ff71642cf7b4f563a2b42eff.zip |
bugfix: potential segfault on startup when builtin module was specified in module() statement.
Thanks to Marius Tomaschewski for reporting the bug.
Diffstat (limited to 'runtime/modules.c')
-rw-r--r-- | runtime/modules.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/modules.c b/runtime/modules.c index 9f7ff31c..ca444895 100644 --- a/runtime/modules.c +++ b/runtime/modules.c @@ -1041,7 +1041,6 @@ Load(uchar *pModName, sbool bConfLoad, struct nvlst *lst) if(bConfLoad) { localRet = readyModForCnf(pModInfo, &pNew, &pLast); if(pModInfo->setModCnf != NULL && localRet == RS_RET_OK) { - addModToCnfList(pNew, pLast); if(!strncmp((char*)pModName, "builtin:", sizeof("builtin:")-1)) { if(pModInfo->bSetModCnfCalled) { errmsg.LogError(0, RS_RET_DUP_PARAM, @@ -1057,6 +1056,11 @@ Load(uchar *pModName, sbool bConfLoad, struct nvlst *lst) pModInfo->setModCnf(lst); pModInfo->bSetModCnfCalled = 1; } + } else { + /* regular modules need to be added to conf list (for + * builtins, this happend during initial load). + */ + addModToCnfList(pNew, pLast); } } } |