Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/amiga fix off-by-one
details: https://anonhg.NetBSD.org/src/rev/9c210617603e
branches: trunk
changeset: 351758:9c210617603e
user: rin <rin%NetBSD.org@localhost>
date: Sat Feb 25 22:40:18 2017 +0000
description:
fix off-by-one
diffstat:
sys/arch/amiga/amiga/disksubr.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r f0fb74483560 -r 9c210617603e sys/arch/amiga/amiga/disksubr.c
--- a/sys/arch/amiga/amiga/disksubr.c Sat Feb 25 21:16:50 2017 +0000
+++ b/sys/arch/amiga/amiga/disksubr.c Sat Feb 25 22:40:18 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.63 2015/07/04 06:13:01 maxv Exp $ */
+/* $NetBSD: disksubr.c,v 1.64 2017/02/25 22:40:18 rin Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.63 2015/07/04 06:13:01 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.64 2017/02/25 22:40:18 rin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -378,7 +378,7 @@
#ifdef DIAGNOSTIC
if (lp->d_secpercyl * lp->d_secsize !=
(pbp->e.secpertrk * pbp->e.numheads * pbp->e.sizeblock<<2)) {
- if (pbp->partname[0] < sizeof(pbp->partname))
+ if (pbp->partname[0] + 1 < sizeof(pbp->partname))
pbp->partname[pbp->partname[0] + 1] = 0;
else
pbp->partname[sizeof(pbp->partname) - 1] = 0;
Home |
Main Index |
Thread Index |
Old Index