mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
journal-importer: ignore invalid field at one more place
Fixes oss-fuzz#28817. https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28817
This commit is contained in:
parent
3d909037e3
commit
8786d4bbe4
@ -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] = '=';
|
||||
|
||||
|
BIN
test/fuzz/fuzz-journal-remote/oss-fuzz-28817
Normal file
BIN
test/fuzz/fuzz-journal-remote/oss-fuzz-28817
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user