[PATCH 1/5] virCommandAddArg: Don't abort on invalid input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <pkrempa@xxxxxxxxxx>
---
 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);
-- 
2.28.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux