diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-06 20:20:51 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-08-06 20:20:51 +0000 |
commit | a7a9e013291754e27e5d074fae5b65cc045ce51b (patch) | |
tree | f5f4b925fe24be5b6ba71ec6a132ccf179d17729 | |
parent | ccf8545f2c53dab155347fbeb1f1079411e44af2 (diff) | |
download | rsyslog-a7a9e013291754e27e5d074fae5b65cc045ce51b.tar.gz rsyslog-a7a9e013291754e27e5d074fae5b65cc045ce51b.tar.xz rsyslog-a7a9e013291754e27e5d074fae5b65cc045ce51b.zip |
applied a patch from varmojfekoj which solved a potential segfault of
rsyslogd on HUP
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | syslogd.c | 15 |
2 files changed, 13 insertions, 4 deletions
@@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 1.18.1 (rgerhards), 2007-08-?? +- applied a patch from varmojfekoj which solved a potential segfault + of rsyslogd on HUP --------------------------------------------------------------------------- Version 1.18.0 (rgerhards), 2007-08-03 - rsyslog now supports fallback actions when an action did not work. This @@ -5178,7 +5178,8 @@ static rsRetVal selectorAddList(selector_t *f) DEFiRet; int iActionCnt; -static selector_t *nextp = NULL; + static selector_t *nextp = NULL; /* TODO: make this go away (see comment below) */ + if(f != NULL) { CHKiRet(llGetNumElts(&f->llActList, &iActionCnt)); if(iActionCnt == 0) { @@ -5192,9 +5193,15 @@ static selector_t *nextp = NULL; } /* successfully created an entry */ dprintf("selector line successfully processed\n"); - // TODO: we should use the linked list class for the selector list, else we need to add globals - // ... well nextp could be added temporarily... - if(nextp == NULL) { + /* TODO: we should use the linked list class for the selector list, else we need to add globals + * ... well nextp could be added temporarily... + * Thanks to varmojfekoj for having the idea to just use "Files" to make this + * code work. I had actually forgotten to fix the code here before moving to 1.18.0. + * And, of course, I also did not migrate the selector_t structure to the linked list class. + * However, that should still be one of the very next things to happen. + * rgerhards, 2007-08-06 + */ + if(Files == NULL) { Files = f; } else { nextp->f_next = f; |