summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-16 00:42:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-16 00:42:45 +0000
commitdcf53c92ea15715a4406b9230a1c68943501ffb2 (patch)
tree1d6ac3cb6ae47126af1dc54f4f0f5bac7afc49b7 /sys/arch/sparc
parent3b1414ef904bbd7e35b23fc1509a3ea20e822cae (diff)
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/cgtwo.c8
-rw-r--r--sys/arch/sparc/include/fbio.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/cgtwo.c b/sys/arch/sparc/dev/cgtwo.c
index 226ac6dd77e..9cdbe59a1fc 100644
--- a/sys/arch/sparc/dev/cgtwo.c
+++ b/sys/arch/sparc/dev/cgtwo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cgtwo.c,v 1.15 2001/08/17 13:52:28 mickey Exp $ */
+/* $OpenBSD: cgtwo.c,v 1.16 2001/09/16 00:42:44 millert Exp $ */
/* $NetBSD: cgtwo.c,v 1.22 1997/05/24 20:16:12 pk Exp $ */
/*
@@ -333,7 +333,8 @@ cgtwogetcmap(sc, cmap)
register struct fbcmap *cmap;
{
u_char red[CG2_CMSIZE], green[CG2_CMSIZE], blue[CG2_CMSIZE];
- int error, start, count, ecount;
+ int error;
+ u_int start, count, ecount;
register u_int i;
register volatile u_short *p;
@@ -375,7 +376,8 @@ cgtwoputcmap(sc, cmap)
register struct fbcmap *cmap;
{
u_char red[CG2_CMSIZE], green[CG2_CMSIZE], blue[CG2_CMSIZE];
- int error, start, count, ecount;
+ int error;
+ u_int start, count, ecount;
register u_int i;
register volatile u_short *p;
diff --git a/sys/arch/sparc/include/fbio.h b/sys/arch/sparc/include/fbio.h
index babb49dea1b..2ae9149767e 100644
--- a/sys/arch/sparc/include/fbio.h
+++ b/sys/arch/sparc/include/fbio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fbio.h,v 1.3 1997/08/08 08:26:17 downsj Exp $ */
+/* $OpenBSD: fbio.h,v 1.4 2001/09/16 00:42:44 millert Exp $ */
/* $NetBSD: fbio.h,v 1.5 1996/09/30 23:45:11 abrown Exp $ */
/*
@@ -107,8 +107,8 @@ struct fbinfo {
* Color map I/O.
*/
struct fbcmap {
- int index; /* first element (0 origin) */
- int count; /* number of elements */
+ u_int index; /* first element (0 origin) */
+ u_int count; /* number of elements */
u_char *red; /* red color map elements */
u_char *green; /* green color map elements */
u_char *blue; /* blue color map elements */