bugfix imfile: segfault on startup in "inotify" mode

A segfault happened when more than one file was monitored.
This commit is contained in:
Rainer Gerhards 2014-10-09 08:22:39 +02:00
parent 9da526ef5c
commit 8bf43525fe
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,8 @@ Version 8.4.3 [v8-stable] 2014-10-??
* To: header was duplicated once per recipient (this is permitted,
but an address list is a better choice nowadays)
Thanks to github user cacheus for the patches.
- bugfix imfile: segfault on startup in "inotify" mode
A segfault happened when more than one file was monitored.
- bugfix: rsgtutil sometimes crashed in verify mode if file did not exist
- bugfix imklog: pri was miscalculated
actually, the pri was totally off the real value for PRIs > 9

View File

@ -1093,7 +1093,7 @@ dirsAddFile(int i)
if(dir->currMaxFiles == dir->allocMaxFiles) {
newMax = 2 * allocMaxFiles;
newFileTab = realloc(dirs, newMax * sizeof(dirInfoFiles_t));
newFileTab = realloc(dirs->files, newMax * sizeof(dirInfoFiles_t));
if(newFileTab == NULL) {
errmsg.LogError(0, RS_RET_OUT_OF_MEMORY,
"cannot alloc memory to map directory '%s' file relationship "