aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ospf.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-05-08 10:16:31 +0000
committerGuy Harris <guy@alum.mit.edu>2003-05-08 10:16:31 +0000
commitcec3fc0af8f5d6a7db1d7c00e32edf07d4433349 (patch)
tree168928fe22ef0d4a8e9e83b5b2de9f59332b7f57 /packet-ospf.c
parent580e0f8e7baec9e79420c497e5952f2a92a4376a (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. svn path=/trunk/; revision=7652
Diffstat (limited to 'packet-ospf.c')
-rw-r--r--packet-ospf.c6
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;