From 37dcc6e6772d4b4d6fe3d67a09d2ff7f35968ce7 Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 14 Jul 1998 10:32:27 +0000 Subject: ioctl() request args are unsigned longs, so don't attempt to store them as ints. Among other bugs, doing so at best caused benign overflow followed by fatal sign extension on machines with 32-bit ints and 64-bit longs. --- usr.sbin/vidcontrol/vidcontrol.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 5c3133c..81f13da 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -28,7 +28,7 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: vidcontrol.c,v 1.18 1997/10/27 07:52:10 charnier Exp $"; #endif /* not lint */ #include @@ -170,7 +170,8 @@ void load_font(char *type, char *filename) { FILE *fd = 0; - int i, io, size; + int i, size; + unsigned long io; char *name, *fontmap; char *prefix[] = {"", "", FONT_PATH, FONT_PATH, NULL}; char *postfix[] = {"", ".fnt", "", ".fnt"}; @@ -257,7 +258,7 @@ set_cursor_type(char *appearence) void video_mode(int argc, char **argv, int *index) { - int mode; + unsigned long mode; if (*index < argc) { if (!strcmp(argv[*index], "VGA_40x25")) -- cgit v1.1