aboutsummaryrefslogtreecommitdiffstats
path: root/packet-hsrp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-10-21 09:46:21 +0000
committerGuy Harris <guy@alum.mit.edu>2000-10-21 09:46:21 +0000
commit109721d54322cd554256cfea5fb27199ef9145be (patch)
tree053be2fee85b9de380969a1c61e13a19db4abc7e /packet-hsrp.c
parent563f86ee5eab280006171dbd7fdb411715594355 (diff)
Fix error in code that '\0'-terminates a string - it was putting the
'\0' one byte *past* the end of the buffer, rather than in the last byte of the buffer. svn path=/trunk/; revision=2524
Diffstat (limited to 'packet-hsrp.c')
-rw-r--r--packet-hsrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-hsrp.c b/packet-hsrp.c
index a781ba7451..24832b2d2d 100644
--- a/packet-hsrp.c
+++ b/packet-hsrp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-hsrp.c,v 1.7 2000/08/13 14:08:12 deniel Exp $
+ * $Id: packet-hsrp.c,v 1.8 2000/10/21 09:46:21 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -142,7 +142,7 @@ dissect_hsrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Reserved: 0x%x", hsrp.reserved);
memcpy(auth_buf, hsrp.auth_data, sizeof(hsrp.auth_data));
- auth_buf[sizeof(auth_buf)] = '\0';
+ auth_buf[sizeof(hsrp.auth_data)] = '\0';
proto_tree_add_text(hsrp_tree, NullTVB, offset, 8, "Authentication Data: `%s'", auth_buf);
offset+=8;