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 strncpy should use destination buf length i...
details: https://anonhg.NetBSD.org/src/rev/ea0c58cc7277
branches: trunk
changeset: 346373:ea0c58cc7277
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Jul 11 09:42:20 2016 +0000
description:
strncpy should use destination buf length instead of source buf length.
pointed out by nonaka@n.o.
diffstat:
sys/arch/x86/x86/intr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r bed8868c1498 -r ea0c58cc7277 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c Mon Jul 11 08:09:15 2016 +0000
+++ b/sys/arch/x86/x86/intr.c Mon Jul 11 09:42:20 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.92 2016/06/20 08:14:06 hannken Exp $ */
+/* $NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 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.92 2016/06/20 08:14:06 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.93 2016/07/11 09:42:20 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, INTRDEVNAMEBUF);
+ strncpy(buf, isp->is_xname, len);
out:
mutex_exit(&cpu_lock);
Home |
Main Index |
Thread Index |
Old Index