Module Name: src Committed By: simonb Date: Sun Jun 14 14:40:24 UTC 2020
Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: Include room for the trailing NUL in the way name string. To generate a diff of this commit: cvs rdiff -u -r1.288 -r1.289 src/sys/arch/mips/mips/mips_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.288 src/sys/arch/mips/mips/mips_machdep.c:1.289 --- src/sys/arch/mips/mips/mips_machdep.c:1.288 Sun Jun 14 06:50:31 2020 +++ src/sys/arch/mips/mips/mips_machdep.c Sun Jun 14 14:40:24 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.288 2020/06/14 06:50:31 simonb Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.289 2020/06/14 14:40:24 simonb Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -111,7 +111,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.288 2020/06/14 06:50:31 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.289 2020/06/14 14:40:24 simonb Exp $"); #define __INTR_PRIVATE #include "opt_cputype.h" @@ -1444,7 +1444,7 @@ mips3_tlb_probe(void) static const char * wayname(int ways) { - static char buf[sizeof("xxx-way set-associative")]; + static char buf[sizeof("xxx-way set-associative") + 1]; #ifdef DIAGNOSTIC if (ways > 999)