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>] [day] [month] [year] [list]
Date:	Tue, 19 Apr 2016 15:31:54 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	"David Binderman" <dcb314@...mail.com>
Cc:	"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
	"perex@...ex.cz" <perex@...ex.cz>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: linux-4.6-rc4/sound/pci/ens1370.c:1551: possible bad expression ?

On Mon, 18 Apr 2016 18:17:58 +0200,
David Binderman wrote:
> 
> Hello there,
> 
> [linux-4.6-rc4/sound/pci/ens1370.c:1551]: (style) Expression '(X & 0xf0000)>= 0x4' is always false.
> 
> Source code is
> 
>     if ((ensoniq->ctrl & ES_1371_GPIO_OUTM)>= 4)
>         val = 1;

Thanks for the report.  It's fixed now by the patch below.


Takashi

-- 8< --
From: Takashi Iwai <tiwai@...e.de>
Subject: [PATCH] ALSA: ens1371: Fix "Line In->Rear Out Switch" control

The "Line In->Rear Out Switch" control on ens1371 driver returns a
bogus value, always true, as its check is totally broken.  Fix it to
check the proper GPIO bit mask.

Reported-by: David Binderman <dcb314@...mail.com>
Signed-off-by: Takashi Iwai <tiwai@...e.de>
---
 sound/pci/ens1370.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c
index 0dc44ebb0032..626cd2167d29 100644
--- a/sound/pci/ens1370.c
+++ b/sound/pci/ens1370.c
@@ -1548,7 +1548,7 @@ static int snd_es1373_line_get(struct snd_kcontrol *kcontrol,
 	int val = 0;
 	
 	spin_lock_irq(&ensoniq->reg_lock);
-	if ((ensoniq->ctrl & ES_1371_GPIO_OUTM) >= 4)
+	if (ensoniq->ctrl & ES_1371_GPIO_OUT(4))
 	    	val = 1;
 	ucontrol->value.integer.value[0] = val;
 	spin_unlock_irq(&ensoniq->reg_lock);
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ