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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 5 Feb 2011 15:33:41 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Alexey Dobriyan <adobriyan@...il.com>
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 5, 2011 at 15:20, Alexey Dobriyan <adobriyan@...il.com> wrote:
> --- /dev/null
> +++ b/lib/kstrtox.c
> @@ -0,0 +1,227 @@
> +/*
> + * 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.

> +int _kstrtoul(const char *s, unsigned int base, unsigned long *res)
> +{
> +       unsigned long long tmp;
> +       int rv;
> +
> +       rv = kstrtoull(s, base, &tmp);
> +       if (rv < 0)
> +               return rv;
> +       if (tmp != (unsigned long long)(unsigned long)tmp)
> +               return -EINVAL;

-ERANGE for out-of-range?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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