summaryrefslogtreecommitdiff
path: root/src/journal/journal-verify.c
diff options
context:
space:
mode:
authorGeorge McCollister <george.mccollister@gmail.com>2013-12-31 14:37:32 -0600
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-01-05 09:36:32 -0500
commitaf13a6b0606f166c93cafc9892343f167f880281 (patch)
tree45093bfb7014221f18f28355383a666cf1fde284 /src/journal/journal-verify.c
parent7195aa42e3d3c2b51da5f0ddefa74bd0925441be (diff)
journal: Add missing byte order conversions
Convert entry_array.items[0] to host byte order prior to passing it to chain_cache_put(). [zj: also use le64toh in journal-verify.c] https://bugs.freedesktop.org/show_bug.cgi?id=73194
Diffstat (limited to 'src/journal/journal-verify.c')
-rw-r--r--src/journal/journal-verify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
index 3405811534..82b0f0a98b 100644
--- a/src/journal/journal-verify.c
+++ b/src/journal/journal-verify.c
@@ -249,12 +249,12 @@ static int journal_file_object_verify(JournalFile *f, uint64_t offset, Object *o
}
for (i = 0; i < journal_file_entry_array_n_items(o); i++)
- if (o->entry_array.items[i] != 0 &&
- !VALID64(o->entry_array.items[i])) {
+ if (le64toh(o->entry_array.items[i]) != 0 &&
+ !VALID64(le64toh(o->entry_array.items[i]))) {
log_error(OFSfmt": invalid object entry array item (%"PRIu64"/%"PRIu64"): "OFSfmt,
offset,
i, journal_file_entry_array_n_items(o),
- o->entry_array.items[i]);
+ le64toh(o->entry_array.items[i]));
return -EBADMSG;
}