diff options
author | Guy Harris <guy@alum.mit.edu> | 2000-10-21 09:46:21 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2000-10-21 09:46:21 +0000 |
commit | 109721d54322cd554256cfea5fb27199ef9145be (patch) | |
tree | 053be2fee85b9de380969a1c61e13a19db4abc7e /packet-hsrp.c | |
parent | 563f86ee5eab280006171dbd7fdb411715594355 (diff) | |
download | wireshark-109721d54322cd554256cfea5fb27199ef9145be.tar.gz wireshark-109721d54322cd554256cfea5fb27199ef9145be.tar.bz2 wireshark-109721d54322cd554256cfea5fb27199ef9145be.zip |
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.c | 4 |
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; |