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]
Message-ID: <599CC17F.90806@rock-chips.com>
Date:   Wed, 23 Aug 2017 07:42:55 +0800
From:   jeffy <jeffy.chen@...k-chips.com>
To:     Mark Brown <broonie@...nel.org>
CC:     linux-kernel@...r.kernel.org, tiwai@...e.de,
        dolinux.peng@...il.com, Jaroslav Kysela <perex@...ex.cz>,
        alsa-devel@...a-project.org, Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH] ASoC: Add a sanity check before using dai driver name

hi Mark,

On 08/23/2017 12:17 AM, Mark Brown wrote:
> On Tue, Aug 22, 2017 at 10:45:12PM +0800, Jeffy Chen wrote:
>
>> -			return dai;
>> +			if (!dlc->dai_name)
>> +				return dai;
>> +			if (!strcmp(dai->name, dlc->dai_name))
>> +				return dai;
>
> You want (dlc->dai_name && !strcmp(dai->name, dlc->dai_name)) for this
> to be equivalent don't you?
i think the original check is allowing NULL dlc dai_name to be a match...
so we basically did:
reject when dlc dai_name is valid, but not match the dai name

and my patch is:
accept when dlc dai_name is invalid
accept when match dai name
accept when match dai driver name(only when it is valid)

so it's a "if (a && b) reject" to "if (!a || !b) accept" case..

>
>> +			if (dai->driver->name &&
>> +			    !strcmp(dai->driver->name, dlc->dai_name))
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ