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:	Mon, 16 Mar 2015 19:16:58 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	Arjun Sreedharan <arjun024@...il.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86,boot: standardize strcmp()

On Mon, Mar 16, 2015 at 09:07:47PM +0530, Arjun Sreedharan wrote:
> strcmp() is always expected to return 0 when args are
> same, <0 when arg1 is lesser and >0 otherwise.
> Previously strcmp("a","b") returned 1. Now it gives -1.
> 
> Signed-off-by: Arjun Sreedharan <arjun024@...il.com>
> ---
>  arch/x86/boot/string.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
> index 493f3fd..318b846 100644
> --- a/arch/x86/boot/string.c
> +++ b/arch/x86/boot/string.c
> @@ -30,7 +30,7 @@ int strcmp(const char *str1, const char *str2)
>  	int delta = 0;
>  
>  	while (*s1 || *s2) {
> -		delta = *s2 - *s1;
> +		delta = *s1 - *s2;
>  		if (delta)
>  			return delta;
>  		s1++;
> -- 

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
--
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