ryantimwilson / rpms / systemd

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