Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/sunos Redo previous. zero check before modulo.
details: https://anonhg.NetBSD.org/src/rev/44a015979182
branches: trunk
changeset: 342202:44a015979182
user: nakayama <nakayama%NetBSD.org@localhost>
date: Sat Dec 12 17:48:18 2015 +0000
description:
Redo previous. zero check before modulo.
diffstat:
sys/compat/sunos/sunos_ioctl.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 3af22dcc4ea2 -r 44a015979182 sys/compat/sunos/sunos_ioctl.c
--- a/sys/compat/sunos/sunos_ioctl.c Sat Dec 12 16:57:53 2015 +0000
+++ b/sys/compat/sunos/sunos_ioctl.c Sat Dec 12 17:48:18 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $ */
+/* $NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $ */
/*
* Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.66 2015/12/11 08:19:07 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -880,6 +880,10 @@
if (error)
break;
+ if (label.d_secpercyl == 0) {
+ error = ERANGE; /* XXX */
+ break;
+ }
if (pi.pi_offset % label.d_secpercyl != 0) {
error = ERANGE; /* XXX */
break;
Home |
Main Index |
Thread Index |
Old Index