summaryrefslogtreecommitdiffstats
path: root/src/journal/fuzz-journald-kmsg.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:42 +0000
commit78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch)
treef515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/journal/fuzz-journald-kmsg.c
parentAdding debian version 255.5-1. (diff)
downloadsystemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz
systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/journal/fuzz-journald-kmsg.c')
-rw-r--r--src/journal/fuzz-journald-kmsg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/fuzz-journald-kmsg.c b/src/journal/fuzz-journald-kmsg.c
index 104a9b3..1a19f50 100644
--- a/src/journal/fuzz-journald-kmsg.c
+++ b/src/journal/fuzz-journald-kmsg.c
@@ -5,16 +5,16 @@
#include "journald-kmsg.h"
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
- Server s;
+ _cleanup_(server_freep) Server *s = NULL;
if (size == 0)
return 0;
fuzz_setup_logging();
- dummy_server_init(&s, data, size);
- dev_kmsg_record(&s, s.buffer, size);
- server_done(&s);
+ assert_se(server_new(&s) >= 0);
+ dummy_server_init(s, data, size);
+ dev_kmsg_record(s, s->buffer, size);
return 0;
}