diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-10 17:47:10 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-10 17:47:10 +0200 |
commit | dc4d262886742b2b4085a0be5f30c8a5299fc6f2 (patch) | |
tree | d44db6e86527cf30036d49f417f9933dce2f8a60 /plugins/imjournal/imjournal.c | |
parent | bb3143655df3ee66cbba3a215502b880b57e69c3 (diff) | |
parent | 940327046c6302dc7955139adfc104e08d0179bd (diff) | |
download | rsyslog-dc4d262886742b2b4085a0be5f30c8a5299fc6f2.tar.gz rsyslog-dc4d262886742b2b4085a0be5f30c8a5299fc6f2.tar.bz2 rsyslog-dc4d262886742b2b4085a0be5f30c8a5299fc6f2.zip |
Merge branch 'v7-stable'
Conflicts:
ChangeLog
Diffstat (limited to 'plugins/imjournal/imjournal.c')
-rwxr-xr-x | plugins/imjournal/imjournal.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/imjournal/imjournal.c b/plugins/imjournal/imjournal.c index ae29154d..cce45b9c 100755 --- a/plugins/imjournal/imjournal.c +++ b/plugins/imjournal/imjournal.c @@ -244,7 +244,14 @@ readjournal() { SD_JOURNAL_FOREACH_DATA(j, get, l) { /* locate equal sign, this is always present */ equal_sign = memchr(get, '=', l); - assert (equal_sign != NULL); + + /* ... but we know better than to trust the specs */ + if (equal_sign == NULL) { + errmsg.LogError(0, RS_RET_ERR,"SD_JOURNAL_FOREACH_DATA()" + " returned a malformed field (has no '='): '%s'", + get); + continue; /* skip the entry */ + } /* get length of journal data prefix */ prefixlen = ((char *)equal_sign - (char *)get); |