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]
Message-Id: <1452191076-12555-1-git-send-email-tim.gardner@canonical.com>
Date:	Thu,  7 Jan 2016 11:24:36 -0700
From:	tim.gardner@...onical.com
To:	reiserfs-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:	Tim Gardner <tim.gardner@...onical.com>
Subject: [PATCH v4.4-rc8] fs/reiserfs: Squelch new_insert_key 'may be used uninitialized' warning

From: Tim Gardner <tim.gardner@...onical.com>

fs/reiserfs/ibalance.c: In function 'balance_internal':
fs/reiserfs/ibalance.c:1156:2: warning: 'new_insert_key' may be used uninitialized in this function [-Wmaybe-uninitialized]
  memcpy(new_insert_key_addr, &new_insert_key, KEY_SIZE);

gcc version 5.3.1 20151219 (Ubuntu 5.3.1-4ubuntu1)

Signed-off-by: Tim Gardner <tim.gardner@...onical.com>
---

It seems unlikely in practice that new_insert_key will get used before being set,
but I can see how the compiler might think that.

 fs/reiserfs/ibalance.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/reiserfs/ibalance.c b/fs/reiserfs/ibalance.c
index b751eea..f16d50e 100644
--- a/fs/reiserfs/ibalance.c
+++ b/fs/reiserfs/ibalance.c
@@ -850,6 +850,8 @@ int balance_internal(struct tree_balance *tb,
 		return order;
 	}
 
+	memset(&new_insert_key, 0, sizeof(new_insert_key));
+
 	k = 0;
 	if (tb->lnum[h] > 0) {
 		/*
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ