diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-08-20 02:04:00 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-08-20 02:04:00 +0000 |
commit | 90ef4c6797ecf97a1dced3c4364dfbabc5fcb20b (patch) | |
tree | cd5eecd51e29d77f0f27c342ee226eb6e8bf0f2c /packet-tds.c | |
parent | 7bc43b4170e73961832deb6a88a819155c4e14af (diff) |
If thou art dissecting a protocol that can have multiple PDUs per frame
and where the PDU header has a length field that is the length of the
entire PDU, including the header, thou shalt not try to loop doing that
if thou findest a packet with a length of zero, lest thou spin in an
infinite loop.
svn path=/trunk/; revision=6031
Diffstat (limited to 'packet-tds.c')
-rw-r--r-- | packet-tds.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packet-tds.c b/packet-tds.c index 36b6faca37..6d4a279f69 100644 --- a/packet-tds.c +++ b/packet-tds.c @@ -2,7 +2,7 @@ * Routines for TDS NetLib dissection * Copyright 2000-2002, Brian Bruns <camber@ais.org> * - * $Id: packet-tds.c,v 1.1 2002/08/19 21:33:29 jmayer Exp $ + * $Id: packet-tds.c,v 1.2 2002/08/20 02:04:00 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -652,6 +652,9 @@ netlib_read_header(tvbuff_t *tvb, guint offset, struct _netlib_data *nl_data) if (nl_data->packet_last!=0 && nl_data->packet_last!=1) { return FALSE; } + if (nl_data->packet_size == 0) { + return FALSE; + } /* if (tvb_length(tvb) != nl_data->packet_size) { return FALSE; |