diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-05-25 19:37:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-05-25 19:37:36 +0000 |
commit | 181be0366590a5a7af3962a7fd6308f8b7eed236 (patch) | |
tree | 437ad1c40d445c37cbd3be647108478d78b735bb /packet-isakmp.c | |
parent | 75648fb8920dd7adcbd54fa49e3c0fdcc578b37b (diff) |
The last byte of "foo[N]" is "foo[N-1]", not "foo[N]".
svn path=/trunk/; revision=7740
Diffstat (limited to 'packet-isakmp.c')
-rw-r--r-- | packet-isakmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packet-isakmp.c b/packet-isakmp.c index ac335d00d7..4e8360a476 100644 --- a/packet-isakmp.c +++ b/packet-isakmp.c @@ -4,7 +4,7 @@ * for ISAKMP (RFC 2407) * Brad Robel-Forrest <brad.robel-forrest@watchguard.com> * - * $Id: packet-isakmp.c,v 1.63 2003/05/25 16:49:47 gerald Exp $ + * $Id: packet-isakmp.c,v 1.64 2003/05/25 19:37:36 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1133,7 +1133,7 @@ situation2str(guint32 type) { ret = snprintf(msg, SIT_MSG_NUM-n, "%sIDENTITY", sep); if (ret == -1 || ret >= SIT_MSG_NUM-n) { /* Truncated. */ - msg[SIT_MSG_NUM] = '\0'; + msg[SIT_MSG_NUM-1] = '\0'; return msg; } n += ret; @@ -1147,7 +1147,7 @@ situation2str(guint32 type) { ret = snprintf(msg, SIT_MSG_NUM-n, "%sSECRECY", sep); if (ret == -1 || ret >= SIT_MSG_NUM-n) { /* Truncated. */ - msg[SIT_MSG_NUM] = '\0'; + msg[SIT_MSG_NUM-1] = '\0'; return msg; } n += ret; @@ -1161,7 +1161,7 @@ situation2str(guint32 type) { ret = snprintf(msg, SIT_MSG_NUM-n, "%sINTEGRITY", sep); if (ret == -1 || ret >= SIT_MSG_NUM-n) { /* Truncated. */ - msg[SIT_MSG_NUM] = '\0'; + msg[SIT_MSG_NUM-1] = '\0'; return msg; } n += ret; |