diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-05-08 10:16:31 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-05-08 10:16:31 +0000 |
commit | 8f3237229f188f9e88113d362e0d87d2e3f9c049 (patch) | |
tree | 168928fe22ef0d4a8e9e83b5b2de9f59332b7f57 /packet-ospf.c | |
parent | e71744f1dc23e876610cff7e2d5d9cc4b5755814 (diff) |
The authentication data field in "simple password" authentication is 64
bits, or 8 bytes; that means that, if it's to be interpreted as a
string, it should be extracted into an 8+1 byte buffer, leaving room for
a trailing '\0', and that means the buffer size argument to
"tvb_get_nstringz0()" should be 8+1 as well.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7652 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ospf.c')
-rw-r--r-- | packet-ospf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packet-ospf.c b/packet-ospf.c index 2fbe524a90..3203a0ea1a 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.74 2003/01/21 20:29:42 jmayer Exp $ + * $Id: packet-ospf.c,v 1.75 2003/05/08 10:16:31 guy Exp $ * * At this time, this module is able to analyze OSPF * packets as specified in RFC2328. MOSPF (RFC1584) and other @@ -415,7 +415,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint16 cksum, computed_cksum; guint length, reported_length; guint16 auth_type; - char auth_data[8]; + char auth_data[8+1]; int crypto_len; unsigned int ospf_header_length; guint8 instance_ID; @@ -556,7 +556,7 @@ dissect_ospf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; case OSPF_AUTH_SIMPLE: - tvb_get_nstringz0(tvb, 16, 8, auth_data); + tvb_get_nstringz0(tvb, 16, 8+1, auth_data); proto_tree_add_text(ospf_header_tree, tvb, 16, 8, "Auth Data: %s", auth_data); break; |