]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #89 in SNORT/snort3 from ips_pdu_flush_patch to master
authorRuss Combs (rucombs) <rucombs@cisco.com>
Tue, 20 Oct 2015 15:46:37 +0000 (11:46 -0400)
committerRuss Combs (rucombs) <rucombs@cisco.com>
Tue, 20 Oct 2015 15:46:37 +0000 (11:46 -0400)
Squashed commit of the following:

commit 5b7bf9d91d1f6020a24c2a98bcb9f0179f10b610
Author: davis mcpherson <davis.mcpherson@gmail.com>
Date:   Tue Oct 20 11:12:32 2015 -0400

    fix init order of local vars, get_q_sequenced must be called before 'seg' is set to value of seglist_next as get_q_sequenced may update seglist_next

src/stream/tcp/tcp_reassembly.cc

index e8d40b0ebef1d7ced2d7d3fd7d3669fb4125cd3d..80ef82729c75d27d2dc641abd05cdd9d13e70da1 100644 (file)
@@ -1163,10 +1163,9 @@ static inline uint32_t flush_pdu_ips(TcpSession* ssn, TcpTracker* trk, uint32_t*
 {
     PERF_PROFILE(s5TcpPAFPerfStats);
 
-    TcpSegment* seg = trk->seglist_next;
-
     uint32_t total = 0;
     uint32_t avail = get_q_sequenced(trk);
+    TcpSegment* seg = trk->seglist_next;
 
     // must stop if gap (checked in paf_check)
     while (seg && *flags && (total < avail))