diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-11 22:22:11 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-11 22:22:11 +0000 |
commit | 3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2 (patch) | |
tree | 03bed05d432c1df0ad84bd1f6d837013b839631e /packet-ospf.c | |
parent | 0bcf2de0d94117c55ecdf109992ec1b9a3634e57 (diff) | |
download | wireshark-3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2.tar.gz wireshark-3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2.tar.bz2 wireshark-3ffd657e1d7b069eed3afc0e0c7d9ccdd5a747f2.zip |
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.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) |