|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] blktap2: Fix off-by-one error in driver lookup
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1252699253 25200
# Node ID 92b42ec8a5677679e5841033544bf82606c3cfd3
# Parent d2a32e24fe504b9626e6732b4f213c7cb1bc8b57
blktap2: Fix off-by-one error in driver lookup
diff --git a/tools/blktap2/drivers/tapdisk-server.c
b/tools/blktap2/drivers/tapdisk-server.c
--- a/tools/blktap2/drivers/tapdisk-server.c
+++ b/tools/blktap2/drivers/tapdisk-server.c
@@ -53,7 +53,7 @@
int n;
n = sizeof(dtypes) / sizeof(struct disk_info_t *);
- if (type > n)
+ if (type >= n)
return NULL;
return dtypes[type]->drv;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] blktap2: Fix off-by-one error in driver lookup,
Brendan Cully <=
|
|
|
|
|