Fix possible seg fault in TCP reassembler.

This commit is contained in:
Jon Siwek 2014-09-29 10:42:01 -05:00
parent cce09b75de
commit c7354c6fa0
3 changed files with 8 additions and 2 deletions

View file

@ -1,4 +1,8 @@
2.3-197 | 2014-09-29 10:42:01 -0500
* Fix possible seg fault in TCP reassembler. (Jon Siwek)
2.3-196 | 2014-09-25 17:53:27 -0700 2.3-196 | 2014-09-25 17:53:27 -0700
* Changing prefix for packet sources/dumper from ':' to '%'. * Changing prefix for packet sources/dumper from ':' to '%'.

View file

@ -1 +1 @@
2.3-196 2.3-197

View file

@ -249,7 +249,9 @@ void TCP_Reassembler::Undelivered(uint64 up_to_seq)
Gap(gap_at_seq, gap_len); Gap(gap_at_seq, gap_len);
last_reassem_seq += gap_len; last_reassem_seq += gap_len;
BlockInserted(b); BlockInserted(b);
b = b->next; // Inserting a block may cause trimming of what's buffered,
// so have to assume 'b' is invalid, hence re-assign to start.
b = blocks;
} }
if ( up_to_seq > last_reassem_seq ) if ( up_to_seq > last_reassem_seq )