From e67e0d4c9036935b74b532b90891b4a0f19ffb0f Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Thu, 23 Jan 2025 13:52:55 -0300 Subject: [PATCH] Fix: check return value when parsing status --- openvasd/openvasd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openvasd/openvasd.c b/openvasd/openvasd.c index 3541e946..f288aa91 100644 --- a/openvasd/openvasd.c +++ b/openvasd/openvasd.c @@ -1471,7 +1471,7 @@ openvasd_parsed_scan_status (openvasd_connector_t conn) resp = openvasd_get_scan_status (conn); status_info = g_malloc0 (sizeof (struct openvasd_scan_status)); - if (resp->code != 200 || !parse_status (resp->body, status_info)) + if (resp->code != 200 || parse_status (resp->body, status_info) == -1) { status_info->status = status_code; status_info->response_code = resp->code;