Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/rbootd use strlcpy



details:   https://anonhg.NetBSD.org/src/rev/64260ad91b77
branches:  trunk
changeset: 550746:64260ad91b77
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Aug 19 22:22:27 2003 +0000

description:
use strlcpy

diffstat:

 usr.sbin/rbootd/bpf.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r cb926ef14848 -r 64260ad91b77 usr.sbin/rbootd/bpf.c
--- a/usr.sbin/rbootd/bpf.c     Tue Aug 19 21:04:22 2003 +0000
+++ b/usr.sbin/rbootd/bpf.c     Tue Aug 19 22:22:27 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.14 2003/08/07 11:25:40 agc Exp $     */
+/*     $NetBSD: bpf.c,v 1.15 2003/08/19 22:22:27 itojun Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -89,7 +89,7 @@
 #if 0
 static char sccsid[] = "@(#)bpf.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: bpf.c,v 1.14 2003/08/07 11:25:40 agc Exp $");
+__RCSID("$NetBSD: bpf.c,v 1.15 2003/08/19 22:22:27 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -306,8 +306,7 @@
                return(NULL);
        }
 
-       (void) strncpy(device, p->ifa_name, sizeof(device));
-       device[sizeof(device) - 1] = '\0';
+       (void) strlcpy(device, p->ifa_name, sizeof(device));
        freeifaddrs(ifap);
        return(device);
 }



Home | Main Index | Thread Index | Old Index