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] [day] [month] [year] [list]
Date:	Wed, 20 Aug 2014 15:33:17 +0200
From:	David Herrmann <dh.herrmann@...il.com>
To:	matthew.garrett@...ula.com
Cc:	platform-driver-x86@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Nick <xerofoify@...il.com>
Subject: Re: [PATCH] platform/x86/toshiba-apci.c possible bad if test?

Hi

On Fri, Jun 13, 2014 at 5:04 AM, Nick <xerofoify@...il.com> wrote:
> diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
> index 76441dc..dfd2243 100644
> --- a/drivers/platform/x86/toshiba_acpi.c
> +++ b/drivers/platform/x86/toshiba_acpi.c
> @@ -1238,7 +1238,7 @@ static ssize_t toshiba_kbd_bl_mode_store(struct device *dev,
>         int mode = -1;
>         int time = -1;
>
> -       if (sscanf(buf, "%i", &mode) != 1 && (mode != 2 || mode != 1))
> +       if (sscanf(buf, "%i", &mode) != 1  || (mode != 2 || mode != 1))
>                 return -EINVAL;

This patch is wrong. Matthew, please revert this or fix it.

(mode != 2 || mode != 1) is a tautology

therefore, this will always return -EINVAL. Furthermore, it lacks a sign-off.

Thanks
David

>         /* Set the Keyboard Backlight Mode where:
> --
> 1.9.1
>
> --
> 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/
--
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