diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-19 20:20:34 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-08-19 20:20:34 +0000 |
commit | 0e4e56ba2a8bbca43a383b503507e521c6476001 (patch) | |
tree | 2f05a44d8c9f74ff7e86173b38250423505d5d19 /cpukit | |
parent | 2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-0e4e56ba2a8bbca43a383b503507e521c6476001.tar.bz2 |
2008-08-19 Cedric Aubert <cedric_aubert@yahoo.fr>
PR 500/misc
* libcsupport/src/termios.c: Avoid potential buffer overflow.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libcsupport/src/termios.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 30eb04d412..6c23e86913 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -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 diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 732964ffb5..c6033ed388 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -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; |