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: <55525DA1.5010701@gmail.com>
Date:	Tue, 12 May 2015 22:08:01 +0200
From:	Mateusz Kulikowski <mateusz.kulikowski@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
CC:	devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 28/33] staging: rtl8192e: Replace ?: with max

On 11.05.2015 15:22, Dan Carpenter wrote:
> On Sat, May 09, 2015 at 11:19:16PM +0200, Mateusz Kulikowski wrote:
(...)
>>  	len = crypt->ops->get_key(keybuf, SCM_KEY_LEN, NULL, crypt->priv);
>> -	erq->length = (len >= 0 ? len : 0);
>> +	if (len > U16_MAX)
>> +		netdev_err(ieee->dev, "Too long key returned.\n");
> 
> Just delete the check if it can't happen or handle the error properly.
> Never printed messages can be annoying.  Static checkers assume all
> conditions can happen so never true conditions are confusing.  It wastes
> RAM.

Ok, will do, thanks.

Regards,
Mateusz

--
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