summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
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/dev
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/dev')
-rw-r--r--sys/arch/sparc/dev/cgtwo.c8
1 files changed, 5 insertions, 3 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;