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] [day] [month] [year] [list]
Message-Id: <20180627.153807.1103262343316196923.davem@davemloft.net>
Date:   Wed, 27 Jun 2018 15:38:07 +0900 (KST)
From:   David Miller <davem@...emloft.net>
To:     cgxu519@....com
Cc:     jakub.kicinski@...ronome.com, oss-drivers@...ronome.com,
        netdev@...r.kernel.org
Subject: Re: [PATCH v2 net] nfp: cast sizeof() to int when comparing with
 error code

From: Chengguang Xu <cgxu519@....com>
Date: Tue, 26 Jun 2018 09:16:31 +0800

> sizeof() will return unsigned value so in the error check
> negative error code will be always larger than sizeof().
> 
> Fixes: a0d8e02c35ff ("nfp: add support for reading nffw info")
> 
> Signed-off-by: Chengguang Xu <cgxu519@....com>
> Acked-by: Jakub Kicinski <jakub.kicinski@...ronome.com>
> ---
> v2:
> - Add more information to patch subject and commit log.

I guess the:

	if (x < 0 || x < sizeof(foo))

better self-documents the situation, but this patch is fine too
so I have applied it.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ