Re: [PATCH] Use ULLONG_MAX when checking for strtoull overflow

FUJITA Tomonori <[email protected]> Thu, 02 Jun 2016 11:11:15 +0900 (JST)
Newsgroups org.kernel.vger.stgt
Message-ID <[email protected]>
On Tue, 24 May 2016 12:15:04 +0300
Apollon Oikonomopoulos <[email protected]> wrote:

> From: Apollon Oikonomopoulos <[email protected]>
> 
> According to strtoull(3):
> 
>  [...] Precisely the same holds for strtoull() (with ULLONG_MAX instead
>  of ULONG_MAX).
> 
> Since we are using strtoull(3) and not strtoul(3), the check should be
> made against ULLONG_MAX. Note that at least on amd64 ULONG_MAX and
> ULLONG_MAX are the same, but this is not guaranteed to be the case for
> other architectures as well.
> 
> Signed-off-by: Apollon Oikonomopoulos <[email protected]>
> ---
>  usr/util.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks!