Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-0]: src/sys/dev/ic Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/ac2b21511372
branches: netbsd-6-0
changeset: 775250:ac2b21511372
user: snj <snj%NetBSD.org@localhost>
date: Sat Aug 19 04:29:10 2017 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #1486):
sys/dev/ic/ciss.c: revision 1.37
Reject negative indices from userland.
diffstat:
sys/dev/ic/ciss.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 29911def53d1 -r ac2b21511372 sys/dev/ic/ciss.c
--- a/sys/dev/ic/ciss.c Sat Aug 19 04:27:35 2017 +0000
+++ b/sys/dev/ic/ciss.c Sat Aug 19 04:29:10 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ciss.c,v 1.27.14.1 2012/11/22 17:26:37 riz Exp $ */
+/* $NetBSD: ciss.c,v 1.27.14.2 2017/08/19 04:29:10 snj Exp $ */
/* $OpenBSD: ciss.c,v 1.14 2006/03/13 16:02:23 mickey Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.27.14.1 2012/11/22 17:26:37 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciss.c,v 1.27.14.2 2017/08/19 04:29:10 snj Exp $");
#include "bio.h"
@@ -1198,12 +1198,12 @@
/* FALLTHROUGH */
case BIOCDISK:
bd = (struct bioc_disk *)addr;
- if (bd->bd_volid > sc->maxunits) {
+ if (bd->bd_volid < 0 || bd->bd_volid > sc->maxunits) {
error = EINVAL;
break;
}
ldp = sc->sc_lds[0];
- if (!ldp || (pd = bd->bd_diskid) > ldp->ndrives) {
+ if (!ldp || (pd = bd->bd_diskid) < 0 || pd > ldp->ndrives) {
error = EINVAL;
break;
}
@@ -1304,7 +1304,7 @@
int error = 0;
u_int blks;
- if (bv->bv_volid > sc->maxunits) {
+ if (bv->bv_volid < 0 || bv->bv_volid > sc->maxunits) {
return EINVAL;
}
ldp = sc->sc_lds[bv->bv_volid];
Home |
Main Index |
Thread Index |
Old Index