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:   Thu, 17 Nov 2016 12:47:11 +0100
From:   Takashi Iwai <tiwai@...e.de>
To:     Joe Perches <joe@...ches.com>
Cc:     Takashi Sakamoto <o-takashi@...amocchi.jp>,
        alsa-devel <alsa-devel@...a-project.org>,
        Clemens Ladisch <clemens@...isch.de>,
        Takashi Iwai <tiwai@...e.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [alsa-devel] sound: bebop: strncmp length oddity

On Sat, 29 Oct 2016 23:37:00 +0200,
Joe Perches wrote:
> 
> 15 isn't the length of the string, is that really what's desired?
> 
> linux/next/sound/firewire/bebob/bebop.c
> 
> -----------------------------
> 
> static bool
> check_audiophile_booted(struct fw_unit *unit)
> {
> 	char name[24] = {0};
> 
> 	if (fw_csr_string(unit->directory, CSR_MODEL, name, sizeof(name)) < 0)
> 		return false;
> 
> 	return strncmp(name, "FW Audiophile Bootloader", 15) != 0;
> }

Indeed it looks bogus.  Even "FW...." string is already 24 letters, so
it's over name[] array size.

Sakamoto-san, could you fix it properly?


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ