aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ospf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-11 22:22:11 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-11 22:22:11 +0000
commit3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2 (patch)
tree03bed05d432c1df0ad84bd1f6d837013b839631e /packet-ospf.c
parent0bcf2de0d94117c55ecdf109992ec1b9a3634e57 (diff)
Handle an LSA length <= the length of an LSA header.
svn path=/trunk/; revision=5447
Diffstat (limited to 'packet-ospf.c')
-rw-r--r--packet-ospf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/packet-ospf.c b/packet-ospf.c
index eb2cfa1453..726b2456ee 100644
--- a/packet-ospf.c
+++ b/packet-ospf.c
@@ -2,7 +2,7 @@
* Routines for OSPF packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-ospf.c,v 1.63 2002/05/11 18:43:09 guy Exp $
+ * $Id: packet-ospf.c,v 1.64 2002/05/11 22:22:11 guy Exp $
*
* At this time, this module is able to analyze OSPF
* packets as specified in RFC2328. MOSPF (RFC1584) and other
@@ -1234,6 +1234,8 @@ dissect_ospf_v2_lsa(tvbuff_t *tvb, int offset, proto_tree *tree,
/* skip past the LSA header to the body */
offset += OSPF_LSA_HEADER_LENGTH;
+ if (ls_length <= OSPF_LSA_HEADER_LENGTH)
+ return offset; /* no data, or bogus length */
ls_length -= OSPF_LSA_HEADER_LENGTH;
if (!disassemble_body)