Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 should use strlcpy instead of strncpy.
details:   https://anonhg.NetBSD.org/src/rev/7acc8ea3718e
branches:  trunk
changeset: 346405:7acc8ea3718e
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Jul 11 23:09:34 2016 +0000
description:
should use strlcpy instead of strncpy.
pointed out by dholland@n.o.
diffstat:
 sys/arch/x86/x86/intr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 928bc8f4a949 -r 7acc8ea3718e sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Mon Jul 11 23:06:53 2016 +0000
+++ b/sys/arch/x86/x86/intr.c   Mon Jul 11 23:09:34 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 knakahara Exp $      */
+/*     $NetBSD: intr.c,v 1.94 2016/07/11 23:09:34 knakahara Exp $      */
 
 /*-
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.94 2016/07/11 23:09:34 knakahara Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -2103,7 +2103,7 @@
        }
        slot = ih->ih_slot;
        isp = ih->ih_cpu->ci_isources[slot];
-       strncpy(buf, isp->is_xname, len);
+       strlcpy(buf, isp->is_xname, len);
 
  out:
        mutex_exit(&cpu_lock);
Home |
Main Index |
Thread Index |
Old Index