summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vidcontrol
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-14 10:32:27 +0000
committerbde <bde@FreeBSD.org>1998-07-14 10:32:27 +0000
commit37dcc6e6772d4b4d6fe3d67a09d2ff7f35968ce7 (patch)
treea373b2923d3525ebde8b04e5c60d62189ff7db73 /usr.sbin/vidcontrol
parentbf57a7d1d1e1af008a5e97eb56445f452973c8ed (diff)
downloadFreeBSD-src-37dcc6e6772d4b4d6fe3d67a09d2ff7f35968ce7.zip
FreeBSD-src-37dcc6e6772d4b4d6fe3d67a09d2ff7f35968ce7.tar.gz
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.
Diffstat (limited to 'usr.sbin/vidcontrol')
-rw-r--r--usr.sbin/vidcontrol/vidcontrol.c7
1 files changed, 4 insertions, 3 deletions
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 <ctype.h>
@@ -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"))
OpenPOWER on IntegriCloud