diff --git a/kern/tty_subr.c b/kern/tty_subr.c --- a/kern/tty_subr.c +++ b/kern/tty_subr.c @@ -58,6 +58,8 @@ clist_free_cblocks(cl); return; } + if (ccmax < 0) + ccmax = 0; data = kmalloc(ccmax * sizeof(*data), M_TTYS, M_INTWAIT|M_ZERO); /* NOTE: cl fields may now be different due to blocking */