Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Always terminate qc_name with NUL because pool_init...
details: https://anonhg.NetBSD.org/src/rev/1b4434182162
branches: trunk
changeset: 788719:1b4434182162
user: alnsn <alnsn%NetBSD.org@localhost>
date: Thu Jul 18 19:39:49 2013 +0000
description:
Always terminate qc_name with NUL because pool_init(9) uses
strcmp(3) to compare wchans.
diffstat:
sys/kern/subr_vmem.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r c2b3a3cb196b -r 1b4434182162 sys/kern/subr_vmem.c
--- a/sys/kern/subr_vmem.c Thu Jul 18 18:43:56 2013 +0000
+++ b/sys/kern/subr_vmem.c Thu Jul 18 19:39:49 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_vmem.c,v 1.83 2013/03/06 11:20:10 yamt Exp $ */
+/* $NetBSD: subr_vmem.c,v 1.84 2013/07/18 19:39:49 alnsn Exp $ */
/*-
* Copyright (c)2006,2007,2008,2009 YAMAMOTO Takashi,
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.83 2013/03/06 11:20:10 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_vmem.c,v 1.84 2013/07/18 19:39:49 alnsn Exp $");
#if defined(_KERNEL)
#include "opt_ddb.h"
@@ -553,6 +553,7 @@
qc->qc_vmem = vm;
snprintf(qc->qc_name, sizeof(qc->qc_name), "%s-%zu",
vm->vm_name, size);
+ qc->qc_name[sizeof(qc->qc_name) - 1] = '\0';
pc = pool_cache_init(size,
ORDER2SIZE(vm->vm_quantum_shift), 0,
Home |
Main Index |
Thread Index |
Old Index