systemd/0059-fuzz-fuzz-compress-fix-copy-and-paste-error-buf-buf2.patch
Jan Macku 79350f79d8 systemd-252-2
Resolves: #2137584,#2138081,#2141979
2022-12-09 09:36:14 +01:00

27 lines
843 B
Diff

From c64c705d9496faba81c8a2326a23f87470ffa692 Mon Sep 17 00:00:00 2001
From: Li kunyu <kunyu@nfschina.com>
Date: Fri, 18 Nov 2022 06:03:41 +0000
Subject: [PATCH] fuzz: fuzz-compress: fix copy-and-paste error: buf -> buf2
(#25431)
(cherry picked from commit f54f6d88b1235487eb7f0c634c488edc7813579a)
Related: #2138081
---
src/fuzz/fuzz-compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fuzz/fuzz-compress.c b/src/fuzz/fuzz-compress.c
index 712ab3ffa9..10956cc548 100644
--- a/src/fuzz/fuzz-compress.c
+++ b/src/fuzz/fuzz-compress.c
@@ -55,7 +55,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
size_t sw_alloc = MAX(h->sw_alloc, 1u);
buf2 = malloc(sw_alloc);
- if (!buf) {
+ if (!buf2) {
log_oom();
return 0;
}