projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fae518
)
qga: fix an off-by-one issue
author
Li Qiang
<liq3ea@gmail.com>
Thu, 18 Oct 2018 02:10:37 +0000
(19:10 -0700)
committer
Michael Roth
<mdroth@linux.vnet.ibm.com>
Wed, 31 Oct 2018 14:04:20 +0000
(09:04 -0500)
Signed-off-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-win32.c
patch
|
blob
|
history
diff --git
a/qga/commands-win32.c
b/qga/commands-win32.c
index a1b7512d462c26be5b3ecee728f16676332fa309..ef1d7d48d2df7224cc87c4c995d84e381e63b73b 100644
(file)
--- a/
qga/commands-win32.c
+++ b/
qga/commands-win32.c
@@
-485,7
+485,7
@@
static STORAGE_BUS_TYPE win2qemu[] = {
static GuestDiskBusType find_bus_type(STORAGE_BUS_TYPE bus)
{
- if (bus > ARRAY_SIZE(win2qemu) || (int)bus < 0) {
+ if (bus >
=
ARRAY_SIZE(win2qemu) || (int)bus < 0) {
return GUEST_DISK_BUS_TYPE_UNKNOWN;
}
return win2qemu[(int)bus];