qemu: include patch for SMART-related buffer overflow
This commit is contained in:
parent
2f119d1a6e
commit
804835333c
@ -1 +1,2 @@
|
||||
0afe916c82b3ec2ed4ff8ee2590c0f5c ide-smart.diff
|
||||
9541063d999cf9659ed7fdce71314f31 qemu-1.7.1.tar.bz2
|
||||
|
@ -7,11 +7,15 @@
|
||||
|
||||
name=qemu
|
||||
version=1.7.1
|
||||
release=1
|
||||
source=(http://wiki.qemu.org/download/qemu-$version.tar.bz2)
|
||||
release=2
|
||||
source=(http://wiki.qemu.org/download/qemu-$version.tar.bz2 ide-smart.diff)
|
||||
|
||||
build() {
|
||||
|
||||
cd $name-$version
|
||||
|
||||
patch -p1 -i $SRC/ide-smart.diff
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--cc="${CC:=gcc}" \
|
||||
--host-cc="${CC:=gcc}" \
|
||||
|
13
qemu/ide-smart.diff
Normal file
13
qemu/ide-smart.diff
Normal file
@ -0,0 +1,13 @@
|
||||
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;
|
Loading…
x
Reference in New Issue
Block a user