diff options
-rw-r--r-- | src/shared/journal-importer.c | 10 | ||||
-rw-r--r-- | test/fuzz/fuzz-journal-remote/oss-fuzz-28817 | bin | 0 -> 256 bytes |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c index 7c4fc7021d..e6b2df21e5 100644 --- a/src/shared/journal-importer.c +++ b/src/shared/journal-importer.c @@ -334,6 +334,16 @@ int journal_importer_process_data(JournalImporter *imp) { if (r < 0) return r; } else { + if (!journal_field_valid(line, n - 1, true)) { + char buf[64], *t; + + t = strndupa(line, n - 1); + log_debug("Ignoring invalid field: \"%s\"", + cellescape(buf, sizeof buf, t)); + + return 0; + } + /* replace \n with = */ line[n-1] = '='; diff --git a/test/fuzz/fuzz-journal-remote/oss-fuzz-28817 b/test/fuzz/fuzz-journal-remote/oss-fuzz-28817 Binary files differnew file mode 100644 index 0000000000..5b12055956 --- /dev/null +++ b/test/fuzz/fuzz-journal-remote/oss-fuzz-28817 |