git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vhost: add sanity check on inflight last index
[dpdk.git]
/
lib
/
vhost
/
vhost.c
diff --git
a/lib/vhost/vhost.c
b/lib/vhost/vhost.c
index
9540522
..
3b674ac
100644
(file)
--- a/
lib/vhost/vhost.c
+++ b/
lib/vhost/vhost.c
@@
-1226,6
+1226,9
@@
rte_vhost_set_last_inflight_io_split(int vid, uint16_t vring_idx,
if (unlikely(!vq->inflight_split))
return -1;
+ if (unlikely(idx >= vq->size))
+ return -1;
+
vq->inflight_split->last_inflight_io = idx;
return 0;
}