From 85a131e8d8aa9fe3c2115e281569bed64a4200f1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 27 Dec 2011 22:58:20 +0100 Subject: [PATCH] journal: fix hash table lookup logic --- src/journal/journal-file.c | 3 ++- src/journal/sd-journal.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 4a006d3b..80775e1a 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -595,7 +595,7 @@ int journal_file_find_data_object_with_hash( return r; if (le64toh(o->data.hash) != hash) - return -EBADMSG; + goto next; if (o->object.flags & OBJECT_COMPRESSED) { #ifdef HAVE_XZ @@ -637,6 +637,7 @@ int journal_file_find_data_object_with_hash( return 1; } + next: p = le64toh(o->data.next_hash_offset); } diff --git a/src/journal/sd-journal.h b/src/journal/sd-journal.h index 7e2ef153..9872e9c2 100644 --- a/src/journal/sd-journal.h +++ b/src/journal/sd-journal.h @@ -35,7 +35,6 @@ * - implement audit gateway * - extend hash tables table as we go * - accelerate looking for "all hostnames" and suchlike. - * - throttling * - cryptographic hash * - never access beyond fle size check * - OR of matches is borked... -- 2.39.5