From 6a252ab4d1cc893cb70b67f4467ebf4fc6cc47e6 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Mon, 23 Nov 2020 09:59:54 +0100 Subject: [PATCH] virCommandAddArg: Don't abort on invalid input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 912c6b22fc622cd7c7d29c7f8eaeb816b266daac added abort() when the 'val' parameter is NULL along with setting the error variable for the command. We don't want to abort in this case, just set the error. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/util/vircommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 9a4f3d7f32..5117467c1d 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1503,7 +1503,7 @@ virCommandAddArg(virCommandPtr cmd, const char *val) if (val == NULL) { cmd->has_error = EINVAL; - abort(); + return; } arg = g_strdup(val);