From e69a0842d76e0c4f2d14a9a82a3397a20fbaf999 Mon Sep 17 00:00:00 2001
From: huyubiao <huyubiao@huawei.com>
Date: Fri, 27 Dec 2024 15:27:31 +0800
Subject: [PATCH] delete Assertion 'o->object.type == OBJECT_ENTRY_ARRAY'

---
 src/libsystemd/sd-journal/journal-file.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libsystemd/sd-journal/journal-file.c b/src/libsystemd/sd-journal/journal-file.c
index 090d506..38d2a85 100644
--- a/src/libsystemd/sd-journal/journal-file.c
+++ b/src/libsystemd/sd-journal/journal-file.c
@@ -2724,7 +2724,9 @@ static int bump_entry_array(
 
         if (direction == DIRECTION_DOWN) {
                 assert(o);
-                assert(o->object.type == OBJECT_ENTRY_ARRAY);
+                if (o->object.type != OBJECT_ENTRY_ARRAY) {
+                    return -EBADMSG;
+                }
 
                 *ret = le64toh(o->entry_array.next_entry_array_offset);
         } else {
-- 
2.33.0

