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]
Date:   Thu, 13 Oct 2016 12:35:02 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Sean Young <sean@...s.org>,
        Mauro Carvalho Chehab <mchehab@...pensource.com>
Cc:     linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH] [media] rc: Fix uninitialized variable in debug print

    drivers/media/i2c/ir-kbd-i2c.c: In function ‘get_key_haup_common’:
    drivers/media/i2c/ir-kbd-i2c.c:120: warning: ‘toggle’ is used uninitialized in this function

To fix this, use the intermediate "toggle" variable, like is done in
other branches.

Fixes: 00bb820755ed8ee9 ("[media] rc: Hauppauge z8f0811 can decode RC6")
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
 drivers/media/i2c/ir-kbd-i2c.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c
index f95a6bc839d58f5f..0ab8e226c4cc0d19 100644
--- a/drivers/media/i2c/ir-kbd-i2c.c
+++ b/drivers/media/i2c/ir-kbd-i2c.c
@@ -114,7 +114,8 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol,
 		vendor = get_unaligned_be16(buf + 1);
 
 		if (vendor == 0x800f) {
-			*ptoggle = (dev & 0x80) != 0;
+			toggle = (dev & 0x80) != 0;
+			*ptoggle = toggle;
 			*protocol = RC_TYPE_RC6_MCE;
 			dev &= 0x7f;
 			dprintk(1, "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n",
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ