aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/svm/svm_fifo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 87e019ab1f1..3d538293c70 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -496,6 +496,8 @@ svm_fifo_find_chunk (svm_fifo_t * f, u32 pos)
if (pos < prev->key)
{
cur = rb_tree_predecessor (rt, prev);
+ if (rb_node_is_tnil (rt, cur))
+ return 0;
c = uword_to_pointer (cur->opaque, svm_fifo_chunk_t *);
if (svm_fifo_chunk_includes_pos (c, pos))
return c;