clamav/fix-clamonacc-w-error.patch

26 lines
791 B
Diff
Raw Normal View History

From e5de0bd90f856ed8c9b4e05e6e9c4f46920112a6 Mon Sep 17 00:00:00 2001
From: chen-jan <chen_aka_jan@163.com>
Date: Tue, 7 Dec 2021 08:18:21 +0000
Subject: [PATCH] fix clamonacc -w error
---
clamonacc/client/client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clamonacc/client/client.c b/clamonacc/client/client.c
index 347070f..f507eee 100644
--- a/clamonacc/client/client.c
+++ b/clamonacc/client/client.c
@@ -205,7 +205,7 @@ int16_t onas_ping_clamd(struct onas_context **ctx)
/* ping command takes the form --ping [attempts[:interval]] */
opt = optget((*ctx)->opts, "ping");
- if (opt) {
+ if (opt && opt->strarg) {
attempt_str = cli_strdup(opt->strarg);
if (attempt_str) {
if (NULL == attempt_str) {
--
2.30.0