aboutsummaryrefslogtreecommitdiffstats
path: root/follow.c
diff options
context:
space:
mode:
authorLaurent Deniel <laurent.deniel@free.fr>2000-08-24 21:05:16 +0000
committerLaurent Deniel <laurent.deniel@free.fr>2000-08-24 21:05:16 +0000
commit99421f72f4c5df5b3c2c08dde1f1702e2d5f1565 (patch)
tree8627ddd077bfb389d2555b030aca24faf0d22224 /follow.c
parentc691739727398f6c6b0b27c3feee09e8181e9393 (diff)
Do not malloc a TCP fragment for a packet that does not contain data.
svn path=/trunk/; revision=2364
Diffstat (limited to 'follow.c')
-rw-r--r--follow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/follow.c b/follow.c
index bb6e3c63cc..5b688e44b1 100644
--- a/follow.c
+++ b/follow.c
@@ -1,6 +1,6 @@
/* follow.c
*
- * $Id: follow.c,v 1.25 2000/08/11 22:18:12 deniel Exp $
+ * $Id: follow.c,v 1.26 2000/08/24 21:05:16 deniel Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@@ -242,7 +242,7 @@ reassemble_tcp( u_long sequence, u_long length, const char* data,
}
else {
/* out of order packet */
- if( sequence > seq[src_index] ) {
+ if(data_length > 0 && sequence > seq[src_index] ) {
tmp_frag = (tcp_frag *)malloc( sizeof( tcp_frag ) );
tmp_frag->data = (u_char *)malloc( data_length );
tmp_frag->seq = sequence;