]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream/reassembly: fix data overlap check
authorvanlink <paradoxes@163.com>
Thu, 16 Jan 2020 08:27:57 +0000 (16:27 +0800)
committerVictor Julien <victor@inliniac.net>
Thu, 13 Feb 2020 08:48:09 +0000 (09:48 +0100)
Fix function CheckOverlap bug.

(cherry picked from commit 2456f27d08142b571a06ffd211c90a5fa557366a)

src/stream-tcp-list.c

index 31401d023674597bccfa142b5bec53a99cbabfa7..cb47ee8e9237ea9850cfc72a9beda0911982bba4 100644 (file)
@@ -141,7 +141,7 @@ static inline bool CheckOverlap(struct TCPSEG *tree, TcpSegment *seg)
             return true;
         // prev's right edge is beyond our seq, overlap
         const uint32_t prev_re = SEG_SEQ_RIGHT_EDGE(prev);
-        if (SEQ_GT(prev_re, prev->seq))
+        if (SEQ_GT(prev_re, seg->seq))
             return true;
     }