From owner-cvs-sys Wed Oct 22 20:24:26 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA24445 for cvs-sys-outgoing; Wed, 22 Oct 1997 20:24:26 -0700 (PDT) (envelope-from owner-cvs-sys) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id UAA24418; Wed, 22 Oct 1997 20:24:08 -0700 (PDT) (envelope-from yokota@FreeBSD.org) From: Kazutaka YOKOTA Received: (from yokota@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id UAA07704; Wed, 22 Oct 1997 20:23:51 -0700 (PDT) Date: Wed, 22 Oct 1997 20:23:51 -0700 (PDT) Message-Id: <199710230323.UAA07704@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/i386/isa syscons.c syscons.h Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk yokota 1997/10/22 20:23:51 PDT Modified files: sys/i386/isa syscons.c syscons.h Log: Reject unreasonable values passed to CONS_HISTORY ioctl. It did not check the value and caused kernel panic when a large value was given. - Move the configuration option SC_HISTORY_SIZE from syscons.h to syscons.c. - Define the maximum total number of history lines of all consoles. It is SC_HISTORY_SIZE*MAXCONS or 1000*MAXCONS; whichever is larger. CONS_HISTORY will allow the user to set the history size up to SC_HISTORY_SIZE unconditionally (or the current height of the console if it is larger than SC_HISTORY_SIZE). If the user requests a larger buffer, it will be granted only if the total number of all allocated history lines and the requested number of lines won't exceed the maximum. - Don't free the previous history buffer and leave the history buffer pointer holding a invalid pointer. Set the pointer to NULL first, then free the buffer. PR: bin/4592 Revision Changes Path 1.235 +83 -21 src/sys/i386/isa/syscons.c 1.35 +1 -5 src/sys/i386/isa/syscons.h