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]
Date:	Sat, 5 Feb 2011 16:40:04 +0200
From:	Alexey Dobriyan <adobriyan@...il.com>
To:	Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/52] kstrtox: converting strings to integers done
 (hopefully) right

On Sat, Feb 05, 2011 at 03:33:41PM +0100, Geert Uytterhoeven wrote:
> On Sat, Feb 5, 2011 at 15:20, Alexey Dobriyan <adobriyan@...il.com> wrote:

> > + * Convert integer string representation to an integer.
> > + * If an integer doesn't fit into specified type, -E is returned.
> 
> Which -E? Currently it returns -EINVAL everywhere.

Comment meant function follows 0/-E idiom for return value.

> > +       if (tmp != (unsigned long long)(unsigned long)tmp)
> > +               return -EINVAL;
> 
> -ERANGE for out-of-range?

Hmm, interesting.
It should prevent -EINVAL hardcoding.
--
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