diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-05-11 22:22:11 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-05-11 22:22:11 +0000 |
commit | f7c973916ea3979cf700619a8fbeed8a6edad4b6 (patch) | |
tree | 03bed05d432c1df0ad84bd1f6d837013b839631e /packet-ospf.c | |
parent | 28b719a3628286913b517a884fe53369aecc16e9 (diff) |
Handle an LSA length <= the length of an LSA header.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5447 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ospf.c')
-rw-r--r-- | packet-ospf.c | 4 |
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) |