diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-08-16 20:51:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-08-16 21:00:47 +0200 |
commit | 2dee23ebe09965308c67a661ed0a8d2cc0ae1d5f (patch) | |
tree | a204a3ffb3f2f135d1d37280479cdf241e348f5f /src/journal/journal-verify.c | |
parent | 45b51b6b71c9de2067dc42c689879bb051517ccb (diff) |
journal: count number of entry arrays in header
Diffstat (limited to 'src/journal/journal-verify.c')
-rw-r--r-- | src/journal/journal-verify.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c index 55ca52a641..b4e34d18a8 100644 --- a/src/journal/journal-verify.c +++ b/src/journal/journal-verify.c @@ -837,6 +837,13 @@ int journal_file_verify(JournalFile *f, const char *key) { goto fail; } + if (JOURNAL_HEADER_CONTAINS(f->header, n_entry_arrays) && + n_entry_arrays != le64toh(f->header->n_entry_arrays)) { + log_error("Entry array number mismatch"); + r = -EBADMSG; + goto fail; + } + if (n_data_hash_tables != 1) { log_error("Missing data hash table"); r = -EBADMSG; |