Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/dev/sun Pull up revision 1.4 (requested by itojun i...



details:   https://anonhg.NetBSD.org/src/rev/60452dcab66b
branches:  netbsd-1-6
changeset: 529067:60452dcab66b
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Sep 04 14:06:10 2002 +0000

description:
Pull up revision 1.4 (requested by itojun in ticket #768):
correct integer overrun

diffstat:

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

diffs (27 lines):

diff -r 16c8bd9a50a1 -r 60452dcab66b sys/dev/sun/bt_subr.c
--- a/sys/dev/sun/bt_subr.c     Wed Sep 04 14:03:34 2002 +0000
+++ b/sys/dev/sun/bt_subr.c     Wed Sep 04 14:06:10 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bt_subr.c,v 1.2.10.1 2002/08/07 01:55:48 lukem Exp $ */
+/*     $NetBSD: bt_subr.c,v 1.2.10.2 2002/09/04 14:06:10 lukem Exp $ */
 
 /*
  * Copyright (c) 1993
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bt_subr.c,v 1.2.10.1 2002/08/07 01:55:48 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bt_subr.c,v 1.2.10.2 2002/09/04 14:06:10 lukem Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -148,7 +148,7 @@
 
        start = p->index;
        count = p->count;
-       if (start >= cmsize || start + count > cmsize)
+       if (start >= cmsize || count > cmsize - start)
                return (EINVAL);
 
        if (uspace) {



Home | Main Index | Thread Index | Old Index