Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2]: src/sys/arch/acorn32/podulebus Pull up following revision(s) ...



details:   https://anonhg.NetBSD.org/src/rev/503791d32cc6
branches:  netbsd-2
changeset: 564536:503791d32cc6
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Oct 09 21:42:09 2006 +0000

description:
Pull up following revision(s) (requested by bjh21 in ticket #10703):
        sys/arch/acorn32/podulebus/simide.c: revision 1.24
PR 23783: the correct number of elements to insert into cmd_iohs is WDC_NREG,
not DRIVE_REGISTERS_SPACE.  The latter is much bigger and causes a buffer
overrun and panic.  Patch supplied by Mike Pumford.

diffstat:

 sys/arch/acorn32/podulebus/simide.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e42d8057165d -r 503791d32cc6 sys/arch/acorn32/podulebus/simide.c
--- a/sys/arch/acorn32/podulebus/simide.c       Sun Oct 08 11:30:35 2006 +0000
+++ b/sys/arch/acorn32/podulebus/simide.c       Mon Oct 09 21:42:09 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: simide.c,v 1.18 2004/01/03 22:56:52 thorpej Exp $      */
+/*     $NetBSD: simide.c,v 1.18.4.1 2006/10/09 21:42:09 bouyer Exp $   */
 
 /*
  * Copyright (c) 1997-1998 Mark Brinicombe
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.18 2004/01/03 22:56:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.18.4.1 2006/10/09 21:42:09 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -262,7 +262,7 @@
                    simide_info[channel].drive_registers,
                    DRIVE_REGISTERS_SPACE, 0, &cp->cmd_baseioh)) 
                        continue;
-               for (i = 0; i < DRIVE_REGISTERS_SPACE; i++) {
+               for (i = 0; i < WDC_NREG; i++) {
                        if (bus_space_subregion(cp->cmd_iot, cp->cmd_baseioh,
                                i, i == 0 ? 4 : 1, &cp->cmd_iohs[i]) != 0) {
                                bus_space_unmap(cp->cmd_iot, cp->cmd_baseioh,



Home | Main Index | Thread Index | Old Index