aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/memif/node.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2021-06-10 17:41:57 +0200
committerDave Wallace <dwallacelf@gmail.com>2021-06-11 17:38:03 +0000
commit6510663c7a07d68415b7be4618f2a8959870c58b (patch)
treedc90bb6e8eec8eee4154379c4ffe18b37407934a /src/plugins/memif/node.c
parent3558a9a0bab51e829da8d9b2504e44a88ad59a35 (diff)
memif: fix crash with zero-copy slave
Type: fix Change-Id: I456cc0b0a6f2dc32b14791baf9d4a7f67279e8df Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/memif/node.c')
-rw-r--r--src/plugins/memif/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index 102d93da674..c7ad9740b02 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -809,7 +809,7 @@ refill:
d[6].offset = (u64) vlib_get_buffer (vm, bi[6])->data - offset;
d[7].offset = (u64) vlib_get_buffer (vm, bi[7])->data - offset;
- slot += 8;
+ slot = (slot + 8) & mask;
n_alloc -= 8;
continue;