diff options
author | yokota <yokota@FreeBSD.org> | 1997-10-23 03:23:50 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1997-10-23 03:23:50 +0000 |
commit | b13f7d1937225188f0f24693eb4bbc08de1788c7 (patch) | |
tree | 001f102ce8e842198f62cef3d627e7230f5fc2f8 /sys/isa/syscons.h | |
parent | 11e6b28c316cc704cbd4a44e14f3a18fb508d03c (diff) | |
download | FreeBSD-src-b13f7d1937225188f0f24693eb4bbc08de1788c7.zip FreeBSD-src-b13f7d1937225188f0f24693eb4bbc08de1788c7.tar.gz |
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
Diffstat (limited to 'sys/isa/syscons.h')
-rw-r--r-- | sys/isa/syscons.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/isa/syscons.h b/sys/isa/syscons.h index 0c74c32..ccddf83 100644 --- a/sys/isa/syscons.h +++ b/sys/isa/syscons.h @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.h,v 1.33 1997/09/04 23:01:06 yokota Exp $ + * $Id: syscons.h,v 1.34 1997/10/01 20:46:29 sos Exp $ */ #ifndef _I386_ISA_SYSCONS_H_ @@ -102,10 +102,6 @@ #define FONT_8 2 #define FONT_14 4 #define FONT_16 8 -#if !defined(SC_HISTORY_SIZE) -#define SC_HISTORY_SIZE (ROW * 4) -#endif /* SC_HISTORY_SIZE */ -#define HISTORY_SIZE (COL * (SC_HISTORY_SIZE)) /* defines related to hardware addresses */ #define MONO_BASE 0x3B4 /* crt controller base mono */ |