mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 10:19:47 +00:00
Off by one in floppy.c
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
fa74419bb7
commit
4acb3e2f97
1 changed files with 1 additions and 1 deletions
|
@ -670,7 +670,7 @@ static void __reschedule_timeout(int drive, const char *message, int marg)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue