From 92b750d474559c9741793da6e8f6f78a07dd0289 Mon Sep 17 00:00:00 2001 From: enami Date: Mon, 3 Jul 2000 05:06:43 +0000 Subject: [PATCH] Allocate one more byte for the asterisk after the name of interface. --- usr.bin/netstat/if.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 1fc6820f517d..fc9061809022 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.42 2000/07/03 02:51:26 matt Exp $ */ +/* $NetBSD: if.c,v 1.43 2000/07/03 05:06:43 enami Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94"; #else -__RCSID("$NetBSD: if.c,v 1.42 2000/07/03 02:51:26 matt Exp $"); +__RCSID("$NetBSD: if.c,v 1.43 2000/07/03 05:06:43 enami Exp $"); #endif #endif /* not lint */ @@ -100,7 +100,7 @@ intpr(interval, ifnetaddr, pfunc) u_long ifaddraddr; struct sockaddr *sa; struct ifnet_head ifhead; /* TAILQ_HEAD */ - char name[IFNAMSIZ]; + char name[IFNAMSIZ + 1]; /* + 1 for `*' */ #ifdef INET6 char hbuf[NI_MAXHOST]; /* for getnameinfo() */ #ifdef KAME_SCOPEID