mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 18:30:42 +01:00
queue subsystem: fix NULL pointer dereference during config processing
If the queue parameters were incorrectly given, a NULL pointer derefernce could happen during config parsing. Once post that stage, no problem could occur. Detected by Coverity scan, CID 185339
This commit is contained in:
parent
325703bc34
commit
2640eb6211
@ -3108,8 +3108,13 @@ qqueueApplyCnfParam(qqueue_t *pThis, struct nvlst *lst)
|
||||
{
|
||||
int i;
|
||||
struct cnfparamvals *pvals;
|
||||
DEFiRet;
|
||||
|
||||
pvals = nvlstGetParams(lst, &pblk, NULL);
|
||||
if(pvals == NULL) {
|
||||
parser_errmsg("error processing queue config parameters");
|
||||
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
|
||||
}
|
||||
if(Debug) {
|
||||
dbgprintf("queue param blk:\n");
|
||||
cnfparamsPrint(&pblk, pvals);
|
||||
@ -3207,7 +3212,8 @@ qqueueApplyCnfParam(qqueue_t *pThis, struct nvlst *lst)
|
||||
}
|
||||
|
||||
cnfparamvalsDestruct(pvals, &pblk);
|
||||
return RS_RET_OK;
|
||||
finalize_it:
|
||||
RETiRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user