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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421909406-1240-2-git-send-email-dudl@cypress.com>
Date:	Thu, 22 Jan 2015 14:50:06 +0800
From:	Dudley Du <dudl@...ress.com>
To:	dmitry.torokhov@...il.com, jmmahler@...il.com, rydberg@...omail.se
Cc:	Dudley Du <dudl@...ress.com>, bleung@...gle.com,
	dan.carpenter@...cle.com, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] input: cyapa: fix variable dereferenced before check 'gen5_pip->resp_len' issue

Fixes the warning issue of the variable dereferenced before check
'gen5_pip->resp_len' report by dan Carpenter.

Signed-off-by: Dudley Du <dudl@...ress.com>
---
 drivers/input/mouse/cyapa_gen5.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mouse/cyapa_gen5.c b/drivers/input/mouse/cyapa_gen5.c
index 69d9059..ed1af74 100644
--- a/drivers/input/mouse/cyapa_gen5.c
+++ b/drivers/input/mouse/cyapa_gen5.c
@@ -2558,7 +2558,9 @@ static bool cyapa_gen5_irq_cmd_handler(struct cyapa *cyapa)
 			 * trackpad device when booting/rebooting
 			 * their chrome book.
 			 */
-			length = *gen5_pip->resp_len;
+			length = 0;
+			if (gen5_pip->resp_len)
+				length = *gen5_pip->resp_len;
 			cyapa_empty_pip_output_data(cyapa,
 					gen5_pip->resp_data,
 					&length,
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ