lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 6 Sep 2018 09:34:21 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Georgi Djakov <georgi.djakov@...aro.org>
Cc:     linux-kernel@...r.kernel.org,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Subject: [PATCH] interconnect: core: Fix uninitialized variable

There is a potential execution path in which variable *ret* is returned
without being properly initialized previously.

Fix this by initializing variable *ret* to -EINVAL.

Addresses-Coverity-ID: 1473202 ("Uninitialized scalar variable")
Fixes: 81b4cdb447fe ("interconnect: Add generic on-chip interconnect API")
Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
---
 drivers/interconnect/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 2740f1a..ea5245f 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -227,7 +227,7 @@ static int aggregate_requests(struct icc_node *node)
 static int apply_constraints(struct icc_path *path)
 {
 	struct icc_node *next, *prev = NULL;
-	int ret;
+	int ret = -EINVAL;
 	int i;
 
 	for (i = 0; i < path->num_nodes; i++, prev = next) {
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ