summaryrefslogtreecommitdiff
path: root/sys/dev/wscons/wsconsio.h
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/dev/wscons/wsconsio.h
parent3b1414ef904bbd7e35b23fc1509a3ea20e822cae (diff)
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.
Diffstat (limited to 'sys/dev/wscons/wsconsio.h')
-rw-r--r--sys/dev/wscons/wsconsio.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/wscons/wsconsio.h b/sys/dev/wscons/wsconsio.h
index f942e0b8aa8..a2f7dcbfd34 100644
--- a/sys/dev/wscons/wsconsio.h
+++ b/sys/dev/wscons/wsconsio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsconsio.h,v 1.12 2001/08/29 20:20:26 mickey Exp $ */
+/* $OpenBSD: wsconsio.h,v 1.13 2001/09/16 00:42:44 millert Exp $ */
/* $NetBSD: wsconsio.h,v 1.31.2.1 2000/07/07 09:49:17 hannken Exp $ */
/*
@@ -148,6 +148,7 @@ struct wskbd_keyrepeat_data {
/* Manipulate keysym groups. */
struct wskbd_map_data {
u_int maplen; /* number of entries in map */
+#define WSKBDIO_MAXMAPLEN 65536
struct wscons_keymap *map; /* map to get or set */
};
#define WSKBDIO_GETMAP _IOWR('W', 13, struct wskbd_map_data)
@@ -314,7 +315,8 @@ struct wsdisplay_font {
#define WSDISPLAY_FONTENC_PCVT 2
#define WSDISPLAY_FONTENC_ISO7 3 /* greek */
#define WSDISPLAY_FONTENC_SONY 4
- int fontwidth, fontheight, stride;
+ u_int fontwidth, fontheight, stride;
+#define WSDISPLAY_MAXFONTSZ (512*1024)
int bitorder, byteorder;
#define WSDISPLAY_FONTORDER_KNOWN 0 /* i.e, no need to convert */
#define WSDISPLAY_FONTORDER_L2R 1