diff --git a/src/util-streaming-buffer.c b/src/util-streaming-buffer.c index 1c6e131db1..a3c04c4656 100644 --- a/src/util-streaming-buffer.c +++ b/src/util-streaming-buffer.c @@ -68,7 +68,7 @@ int SBBCompare(struct StreamingBufferBlock *a, struct StreamingBufferBlock *b) static inline int InclusiveCompare(StreamingBufferBlock *lookup, StreamingBufferBlock *intree) { const uint64_t lre = lookup->offset + lookup->len; const uint64_t tre = intree->offset + intree->len; - if (lre < intree->offset) // entirely before + if (lre <= intree->offset) // entirely before return -1; else if (lre >= intree->offset && lre <= tre) // (some) overlap return 0;