Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/netstat Allocate one more byte for the asterisk afte...



details:   https://anonhg.NetBSD.org/src/rev/717486c8753b
branches:  trunk
changeset: 494177:717486c8753b
user:      enami <enami%NetBSD.org@localhost>
date:      Mon Jul 03 05:06:43 2000 +0000

description:
Allocate one more byte for the asterisk after the name of interface.

diffstat:

 usr.bin/netstat/if.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 68046644af4a -r 717486c8753b usr.bin/netstat/if.c
--- a/usr.bin/netstat/if.c      Mon Jul 03 05:05:43 2000 +0000
+++ b/usr.bin/netstat/if.c      Mon Jul 03 05:06:43 2000 +0000
@@ -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 @@
        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



Home | Main Index | Thread Index | Old Index