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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1504908933-31667-1-git-send-email-gurugio@gmail.com>
Date:   Sat,  9 Sep 2017 00:15:33 +0200
From:   gurugio@...il.com
To:     linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc:     Gioh Kim <gurugio@...mail.net>,
        Gioh Kim <gi-oh.kim@...fitbricks.com>
Subject: [RFC] mm/memblock.c: using uninitialized value idx in memblock_add_range()

From: Gioh Kim <gurugio@...mail.net>

In memblock_add_range(), idx variable is a local value
but I cannot find initialization of idx value.
I checked idx value on my Qemu emulator. It was zero.
Is there any hidden initialization code?

Signed-off-by: Gioh Kim <gi-oh.kim@...fitbricks.com>
---
 mm/memblock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memblock.c b/mm/memblock.c
index 7b8a5db..23374bc 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -515,7 +515,7 @@ int __init_memblock memblock_add_range(struct memblock_type *type,
 	bool insert = false;
 	phys_addr_t obase = base;
 	phys_addr_t end = base + memblock_cap_size(base, &size);
-	int idx, nr_new;
+	int idx = 0, nr_new;
 	struct memblock_region *rgn;
 
 	if (!size)
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ