Skip to content

Commit f2bd032

Browse files
committed
journal: refuse data which contain invalid fields
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25353.
1 parent adce225 commit f2bd032

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/journal/journal-file.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,6 +1572,9 @@ static int journal_file_append_field(
15721572
assert(f);
15731573
assert(field && size > 0);
15741574

1575+
if (!journal_field_valid(field, size, true))
1576+
return -EBADMSG;
1577+
15751578
hash = journal_file_hash_data(f, field, size);
15761579

15771580
r = journal_file_find_field_object_with_hash(f, field, size, hash, &o, &p);
45 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)