2008-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>

PR 500/misc
	* libcsupport/src/termios.c: Avoid potential buffer overflow.
This commit is contained in:
Joel Sherrill
2008-08-19 20:20:34 +00:00
parent cc4c524bd4
commit 0e4e56ba2a
2 changed files with 7 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2008-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>
PR 500/misc
* libcsupport/src/termios.c: Avoid potential buffer overflow.
2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* libnetworking/kern/kern_sysctl.c, libnetworking/libc/res_debug.c: Fix

View File

@@ -1021,7 +1021,8 @@ fillBufferQueue (struct rtems_termios_tty *tty)
/*
* Process characters read from raw queue
*/
while (tty->rawInBuf.Head != tty->rawInBuf.Tail) {
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;