nixpkgs/pkgs/applications/virtualization/qemu/cve-2014-2894.patch
2014-04-28 14:37:46 +02:00

15 lines
531 B
Diff

diff --git a/hw/ide/core.c b/hw/ide/core.c
index e1dfe54..c943a4d 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -1602,7 +1602,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd)
case 2: /* extended self test */
s->smart_selftest_count++;
if (s->smart_selftest_count > 21) {
- s->smart_selftest_count = 0;
+ s->smart_selftest_count = 1;
}
n = 2 + (s->smart_selftest_count - 1) * 24;
s->smart_selftest_data[n] = s->sector;