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 May 2009 08:42:37 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Roel Kluin <roel.kluin@...il.com>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] cdrom: beyond ARRAY_SIZE of viocd_diskinfo

On Wed, May 20 2009, Roel Kluin wrote:
> Do not go beyond ARRAY_SIZE of viocd_diskinfo

Good catch, applied.

> 
> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
> ---
> diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
> index 1392935..9b1624e 100644
> --- a/drivers/cdrom/viocd.c
> +++ b/drivers/cdrom/viocd.c
> @@ -587,7 +587,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
>  	struct device_node *node = vdev->dev.archdata.of_node;
>  
>  	deviceno = vdev->unit_address;
> -	if (deviceno > VIOCD_MAX_CD)
> +	if (deviceno >= VIOCD_MAX_CD)
>  		return -ENODEV;
>  	if (!node)
>  		return -ENODEV;
> 

-- 
Jens Axboe

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