diff options
author | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-24 21:05:16 +0000 |
---|---|---|
committer | Laurent Deniel <laurent.deniel@free.fr> | 2000-08-24 21:05:16 +0000 |
commit | 99421f72f4c5df5b3c2c08dde1f1702e2d5f1565 (patch) | |
tree | 8627ddd077bfb389d2555b030aca24faf0d22224 /follow.c | |
parent | c691739727398f6c6b0b27c3feee09e8181e9393 (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |