From: Victor Julien Date: Mon, 27 Jun 2022 09:34:14 +0000 (+0200) Subject: stream: fix GAP check X-Git-Tag: suricata-6.0.6~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=909a3fdf4281838cda2718a2acde6ee61cd3c6cc;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. (cherry picked from commit 100d821a9fbe61709be275f77341438626a561e8) --- diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 01306a802e..670182111c 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -930,7 +930,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;