projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cmd64x: potential buffer overflow in cmd64x_program_timings()
[linux-2.6-microblaze.git]
/
drivers
/
ide
/
cmd64x.c
diff --git
a/drivers/ide/cmd64x.c
b/drivers/ide/cmd64x.c
index
a1898e1
..
943bf94
100644
(file)
--- a/
drivers/ide/cmd64x.c
+++ b/
drivers/ide/cmd64x.c
@@
-66,6
+66,9
@@
static void cmd64x_program_timings(ide_drive_t *drive, u8 mode)
struct ide_timing t;
u8 arttim = 0;
+ if (drive->dn >= ARRAY_SIZE(drwtim_regs))
+ return;
+
ide_timing_compute(drive, mode, &t, T, 0);
/*