Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netipsec Fix buffer length for ipsec_logsastr



details:   https://anonhg.NetBSD.org/src/rev/56062096bac7
branches:  trunk
changeset: 356853:56062096bac7
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Tue Oct 17 07:23:08 2017 +0000

description:
Fix buffer length for ipsec_logsastr

diffstat:

 sys/netipsec/ipsec.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 086c2bc02257 -r 56062096bac7 sys/netipsec/ipsec.c
--- a/sys/netipsec/ipsec.c      Tue Oct 17 07:13:19 2017 +0000
+++ b/sys/netipsec/ipsec.c      Tue Oct 17 07:23:08 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipsec.c,v 1.121 2017/10/03 08:25:21 ozaki-r Exp $      */
+/*     $NetBSD: ipsec.c,v 1.122 2017/10/17 07:23:08 ozaki-r Exp $      */
 /*     $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netipsec/ipsec.c,v 1.2.2.2 2003/07/01 01:38:13 sam Exp $       */
 /*     $KAME: ipsec.c,v 1.103 2001/05/24 07:14:18 sakane Exp $ */
 
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.121 2017/10/03 08:25:21 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec.c,v 1.122 2017/10/17 07:23:08 ozaki-r Exp $");
 
 /*
  * IPsec controller part.
@@ -2075,7 +2075,6 @@
        int fr;
        u_int32_t wsizeb;       /* constant: bits of window size */
        int frlast;             /* constant: last frame */
-       char buf[INET6_ADDRSTRLEN];
 
        IPSEC_SPLASSERT_SOFTNET(__func__);
 
@@ -2143,6 +2142,7 @@
 
 ok:
        if (replay->count == ~0) {
+               char buf[IPSEC_LOGSASTRLEN];
 
                /* set overflow flag */
                replay->overflow++;



Home | Main Index | Thread Index | Old Index