diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-03 10:55:20 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-05-03 11:01:52 +0200 |
commit | c0e5c49526e011fa16d757f61ca9dd817ff35903 (patch) | |
tree | bc45d1b479d405e1df4568ede7278492ef121960 /tools/omfile.c | |
parent | adc8d626535c7c79d723ea2a84146b6c1856316f (diff) | |
download | rsyslog-c0e5c49526e011fa16d757f61ca9dd817ff35903.tar.gz rsyslog-c0e5c49526e011fa16d757f61ca9dd817ff35903.tar.bz2 rsyslog-c0e5c49526e011fa16d757f61ca9dd817ff35903.zip |
bugfix: segfault due to invalid dynafile cache handling
Accidently, the old-style cache size parameter was used when the
dynafile cache was created in a RainerScript action. If the old-style
size was lower than the one actually set, this lead to misadressing
when the size was overrun, and that could lead to all kinds of
"interesting things", often in segfaults.
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=440
Conflicts:
ChangeLog
Diffstat (limited to 'tools/omfile.c')
-rw-r--r-- | tools/omfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/omfile.c b/tools/omfile.c index 5b0bfb46..282116d9 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -972,7 +972,7 @@ CODESTARTnewActInst // TODO: create unified code for this (legacy+v6 system) /* we now allocate the cache table */ CHKmalloc(pData->dynCache = (dynaFileCacheEntry**) - calloc(cs.iDynaFileCacheSize, sizeof(dynaFileCacheEntry*))); + calloc(pData->iDynaFileCacheSize, sizeof(dynaFileCacheEntry*))); pData->iCurrElt = -1; /* no current element */ } // TODO: add pData->iSizeLimit = 0; /* default value, use outchannels to configure! */ |