Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/acpi Fix off-by-one in validation of EmbeddedControl...



details:   https://anonhg.NetBSD.org/src/rev/50bda1eeac12
branches:  trunk
changeset: 767616:50bda1eeac12
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sun Jul 24 20:15:09 2011 +0000

description:
Fix off-by-one in validation of EmbeddedControl OperationRegion handler.

diffstat:

 sys/dev/acpi/acpi_ec.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 27fbfb039975 -r 50bda1eeac12 sys/dev/acpi/acpi_ec.c
--- a/sys/dev/acpi/acpi_ec.c    Sun Jul 24 18:06:08 2011 +0000
+++ b/sys/dev/acpi/acpi_ec.c    Sun Jul 24 20:15:09 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_ec.c,v 1.70 2011/02/19 19:39:28 jruoho Exp $      */
+/*     $NetBSD: acpi_ec.c,v 1.71 2011/07/24 20:15:09 jakllsch Exp $    */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.70 2011/02/19 19:39:28 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.71 2011/07/24 20:15:09 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -651,7 +651,7 @@
        unsigned int i;
 
        if (paddr > 0xff || width % 8 != 0 || value == NULL || arg == NULL ||
-           paddr + width / 8 > 0xff)
+           paddr + width / 8 > 0x100)
                return AE_BAD_PARAMETER;
 
        addr = paddr;



Home | Main Index | Thread Index | Old Index