Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Apr 1998 00:10:02 -0800 (PST)
From:      Don Morrison <dmorrisn@u.washington.edu>
To:        freebsd-bugs
Subject:   Re:bin/6188: screensaver permanently active because of no upper-bounds checking of blanktime in vidcontrol
Message-ID:  <199804020810.AAA20193@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6188; it has been noted by GNATS.

From: Don Morrison <dmorrisn@u.washington.edu>
To: bug-followup@FreeBSD.ORG
Cc:  Subject: Re:bin/6188: screensaver permanently active because of no upper-bounds checking of blanktime in vidcontrol
Date: Thu, 02 Apr 1998 00:03:30 -0800

 Here's another reasonable patch for this:
 
 *** /usr/src/usr.sbin/vidcontrol/vidcontrol.c.orig      Wed Apr  1
 23:43:58 1998
 --- /usr/src/usr.sbin/vidcontrol/vidcontrol.c   Wed Apr  1 23:42:50 1998
 
 ***************
 *** 36,41 ****
 --- 36,42 ----
   #include <stdio.h>
   #include <stdlib.h>
   #include <machine/console.h>
 + #include <machine/limits.h>
   #include <sys/errno.h>
   #include "path.h"
 
 ***************
 *** 222,229 ****
                 nsec = 0;
         else {
                 nsec = atoi(arg);
 !               if ((*arg == '\0') || (nsec < 1)) {
 !                       warnx("argument must be a positive number");
                         return;
                 }
         }
 --- 223,230 ----
                 nsec = 0;
         else {
                 nsec = atoi(arg);
 !               if ((*arg == '\0') || (nsec < 1) || (nsec > USHRT_MAX))
 {
 !                       warnx("blanktime out of range");
                         return;
                 }
         }
 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804020810.AAA20193>