dryang / rpms / systemd

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