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, 3 Jun 2013 12:57:14 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Jiri Kosina <jkosina@...e.cz>,
	Andy Shevchenko <andy.shevchenko@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 2/8] pktcdvd: Convert printk to pr_<level>

On Fri, May 31, 2013 at 09:11:23PM -0700, Joe Perches wrote:
> +static const char *sense_key_string(__u8 index)
> +{
> +	static const char *info[9] = {
> +		"No sense", "Recovered error", "Not ready",
> +		"Medium error", "Hardware error", "Illegal request",
> +		"Unit attention", "Data protect", "Blank check"
> +	};
> +	if (index < 8)

Off by one:

	if (index < 9)


> +		return info[index];
> +	return "INVALID";

regards,
dan carpenter

--
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