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:	Wed, 5 Jan 2011 01:58:56 +0200
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org,
	Alexander Viro <viro@...iv.linux.org.uk>,
	linux-fsdevel@...r.kernel.org, Mimi Zohar <zohar@...ibm.com>,
	"Serge E. Hallyn" <serge@...lyn.com>,
	David Howells <dhowells@...hat.com>,
	James Morris <jmorris@...ei.org>
Subject: Re: [resend][PATCH] fs: use kernel's hex_to_bin() method

On Wed, Jan 5, 2011 at 1:21 AM, Andrew Morton <akpm@...ux-foundation.org> wrote:

> After which we can change your patch thusly:
>
> --- a/fs/binfmt_misc.c~fs-binfmt_miscc-use-kernels-hex_to_bin-method-fix
> +++ a/fs/binfmt_misc.c
> @@ -244,9 +244,7 @@ static int unquote(char *from)
>
>        while ((c = *s++) != '\0') {
>                if (c == '\\' && *s == 'x') {
> -                       s++;
> -                       *p = hex_to_bin(*s++) << 4;
> -                       *p++ |= hex_to_bin(*s++);
> +                       s = (char *)hex2bin(p, s + 1, 1);
We need to update both p and s.

In case of '\xAA\xBB' you have result -> '0xBB'.
Am I wrong?

>                        continue;
>                }
>                *p++ = c;


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ