ia64/xen-unstable
changeset 12490:c677f4e75608
Fix clobbering bug when hde is specified; QEMU only supports up to hdd, but
hde is accepted and writes off the end of some tables.
From Hiromichi Itou <ito@begi.net>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
hde is accepted and writes off the end of some tables.
From Hiromichi Itou <ito@begi.net>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author | Ewan Mellor <ewan@xensource.com> |
---|---|
date | Thu Nov 16 11:11:17 2006 +0000 (2006-11-16) |
parents | d0e9da9cc84a |
children | 9c9dbc5df557 |
files | tools/ioemu/xenstore.c |
line diff
1.1 --- a/tools/ioemu/xenstore.c Thu Nov 16 10:52:03 2006 +0000 1.2 +++ b/tools/ioemu/xenstore.c Thu Nov 16 11:11:17 2006 +0000 1.3 @@ -100,7 +100,7 @@ void xenstore_parse_domain_config(int do 1.4 if (strncmp(dev, "hd", 2) || strlen(dev) != 3) 1.5 continue; 1.6 hd_index = dev[2] - 'a'; 1.7 - if (hd_index > MAX_DISKS) 1.8 + if (hd_index >= MAX_DISKS) 1.9 continue; 1.10 /* read the type of the device */ 1.11 if (pasprintf(&buf, "%s/device/vbd/%s/device-type", path, e[i]) == -1)