From: Victor Julien Date: Mon, 27 Jun 2022 09:34:14 +0000 (+0200) Subject: stream: fix GAP check X-Git-Tag: suricata-7.0.0-beta1~421 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=100d821a9fbe61709be275f77341438626a561e8;p=thirdparty%2Fsuricata.git stream: fix GAP check Gap check would consider a GAP when the current data was in fact exactly not a gap, but next segment(s) were already available. --- diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index d3de6c054e..bb793cf8e8 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -1015,7 +1015,7 @@ static inline bool GapAhead(TcpStream *stream, StreamingBufferBlock *cur_blk) { StreamingBufferBlock *nblk = SBB_RB_NEXT(cur_blk); if (nblk && (cur_blk->offset + cur_blk->len < nblk->offset) && - GetAbsLastAck(stream) >= (cur_blk->offset + cur_blk->len)) { + GetAbsLastAck(stream) > (cur_blk->offset + cur_blk->len)) { return true; } return false;