From owner-freebsd-bugs Wed Apr 1 02:50:05 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA02284 for freebsd-bugs-outgoing; Wed, 1 Apr 1998 02:50:05 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: (from gnats@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA02277; Wed, 1 Apr 1998 02:50:03 -0800 (PST) (envelope-from gnats) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA01330; Wed, 1 Apr 1998 02:40:10 -0800 (PST) (envelope-from nobody) Message-Id: <199804011040.CAA01330@hub.freebsd.org> Date: Wed, 1 Apr 1998 02:40:10 -0800 (PST) From: dmorrisn@u.washington.edu To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: bin/6188: screensaver permanently active when no bounds checking for blanktime in sysinstall Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 6188 >Category: bin >Synopsis: screensaver permanently active when no bounds checking for blanktime in sysinstall >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 1 02:50:02 PST 1998 >Last-Modified: >Originator: Don Morrison >Organization: N/A (student) >Release: 2.2.6 >Environment: FreeBSD D-128-95-253-128.dhcp.washington.edu 2.2.6-STABLE FreeBSD 2.2.6-STABLE #0: Sun Mar 29 00:47:36 PST 1998 root@D-128-95-253-128.dhcp.washington.edu:/usr/src/sys/compile/MINE i386 >Description: /stand/sysinstall does not make bounds checks for the screensaver time-out interval. When this value is read from /etc/rc.conf at startup and is excessively high it can cause the screensaver to take over the screen by remaining continuously active. The user can type commands, but cannot see the output. This is only a bit annoying, but a new user might not know how to correct the problem. >How-To-Repeat: Enter the /stand/sysinstall program. Enter the Post-Install Configuration Menu. Select Console settings. Select Screensaver settings. Select the time-out interval setting and enter 2147483648. Exit the sysinstall program and reboot. The screensaver should take over the screen as soon as it is started by the startup script. >Fix: *** /usr/src/release/sysinstall/config.c.orig Wed Apr 1 00:13:25 1998 --- /usr/src/release/sysinstall/config.c Wed Apr 1 01:53:02 1998 *************** *** 461,469 **** int configSaverTimeout(dialogMenuItem *self) { ! return (variable_get_value(VAR_BLANKTIME, ! "Enter time-out period in seconds for screen saver") ? ! DITEM_SUCCESS : DITEM_FAILURE) | DITEM_RESTORE; } int --- 461,479 ---- int configSaverTimeout(dialogMenuItem *self) { ! int blanktime; ! ! if (!variable_get_value(VAR_BLANKTIME, ! "Enter time-out period in seconds for screen saver")) ! return DITEM_FAILURE | DITEM_RESTORE; ! ! blanktime = atoi(variable_get(VAR_BLANKTIME)); ! if ( blanktime <= 0 ) ! variable_set2(VAR_BLANKTIME, "NO"); ! else if ( blanktime > USHRT_MAX ) ! variable_set2(VAR_BLANKTIME, itoa(USHRT_MAX)); ! ! return DITEM_SUCCESS | DITEM_RESTORE; } int >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message