public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [Patch] Off by one in floppy.c
@ 2007-05-21 22:57 Eric Sesterhenn / Snakebyte
  2007-05-22  1:07 ` Pete Zaitcev
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn / Snakebyte @ 2007-05-21 22:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: zaitcev

hi,

another coverity patch i forgot to resend,
original thread here
http://marc.info/?l=linux-kernel&m=115144559823592&w=2

In case drive == N_DRIVE, we get one past the drive_params array.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>


--- linux-2.6/drivers/block/floppy.c.orig	2007-05-22 00:54:03.000000000 +0200
+++ linux-2.6/drivers/block/floppy.c	2007-05-22 00:54:18.000000000 +0200
@@ -670,7 +670,7 @@ static void __reschedule_timeout(int dri
 	if (drive == current_reqD)
 		drive = current_drive;
 	del_timer(&fd_timeout);
-	if (drive < 0 || drive > N_DRIVE) {
+	if (drive < 0 || drive >= N_DRIVE) {
 		fd_timeout.expires = jiffies + 20UL * HZ;
 		drive = 0;
 	} else


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Patch] Off by one in floppy.c
  2007-05-21 22:57 [Patch] Off by one in floppy.c Eric Sesterhenn / Snakebyte
@ 2007-05-22  1:07 ` Pete Zaitcev
  0 siblings, 0 replies; 2+ messages in thread
From: Pete Zaitcev @ 2007-05-22  1:07 UTC (permalink / raw)
  To: Eric Sesterhenn / Snakebyte; +Cc: linux-kernel

On Tue, 22 May 2007 00:57:56 +0200, Eric Sesterhenn / Snakebyte <snakebyte@gmx.de> wrote:

> http://marc.info/?l=linux-kernel&m=115144559823592&w=2

Shows how much we care about floppy... It's going to be a year old soon.

> +++ linux-2.6/drivers/block/floppy.c	2007-05-22 00:54:18.000000000 +0200
> @@ -670,7 +670,7 @@ static void __reschedule_timeout(int dri
>  	if (drive == current_reqD)
>  		drive = current_drive;
>  	del_timer(&fd_timeout);
> -	if (drive < 0 || drive > N_DRIVE) {
> +	if (drive < 0 || drive >= N_DRIVE) {

You need to find someone willing to take this. Maybe Andrew.

-- Pete

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-22  1:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 22:57 [Patch] Off by one in floppy.c Eric Sesterhenn / Snakebyte
2007-05-22  1:07 ` Pete Zaitcev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox