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: <20181210113443.22796-1-yuehaibing@huawei.com>
Date:   Mon, 10 Dec 2018 19:34:43 +0800
From:   YueHaibing <yuehaibing@...wei.com>
To:     <davem@...emloft.net>, <h.morris@...coda.com>,
        <alex.aring@...il.com>, <stefan@...enfreihafen.org>
CC:     <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-wpan@...r.kernel.org>, YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH net-next] ieee802154: ca8210: remove a dead branch

Fix follwing gcc warning:

drivers/net/ieee802154/ca8210.c:730:10: warning:
 comparison is always false due to limited range of data type [-Wtype-limits]

the variable 'len' is of type u8 and cannot greater than
CA8210_SPI_BUF_SIZE , which is 256.

Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
 drivers/net/ieee802154/ca8210.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 0ff5a40..0fe204f 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -727,14 +727,6 @@ static void ca8210_rx_done(struct cas_control *cas_ctl)
 
 	buf = cas_ctl->tx_in_buf;
 	len = buf[1] + 2;
-	if (len > CA8210_SPI_BUF_SIZE) {
-		dev_crit(
-			&priv->spi->dev,
-			"Received packet len (%d) erroneously long\n",
-			len
-		);
-		goto finish;
-	}
 
 	if (buf[0] & SPI_SYN) {
 		if (priv->sync_command_response) {
-- 
2.7.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ