diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-21 16:25:20 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-21 16:25:20 +0000 |
commit | bec8f2b2efeb6efa0239d7193bcc2b2931d76908 (patch) | |
tree | 12c0a54d930f1becfd8b8d5770bbdef0ff0ae669 /cpukit | |
parent | 2010-06-18 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-bec8f2b2efeb6efa0239d7193bcc2b2931d76908.tar.bz2 |
2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1559/misc
Coverity Id 16
* libmisc/monitor/mon-editor.c: Fix buffer overflow.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 6 | ||||
-rw-r--r-- | cpukit/libmisc/monitor/mon-editor.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 1666873784..9d1324cd72 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,9 @@ +2010-06-21 Joel Sherrill <joel.sherrilL@OARcorp.com> + + PR 1559/misc + Coverity Id 16 + * libmisc/monitor/mon-editor.c: Fix buffer overflow. + 2010-06-18 Ralf Corsépius <ralf.corsepius@rtems.org> * rtems/include/rtems/rtems/object.h, diff --git a/cpukit/libmisc/monitor/mon-editor.c b/cpukit/libmisc/monitor/mon-editor.c index 644560699b..1104b50185 100644 --- a/cpukit/libmisc/monitor/mon-editor.c +++ b/cpukit/libmisc/monitor/mon-editor.c @@ -428,7 +428,7 @@ rtems_monitor_line_editor ( if ((pos < end) && (end < RTEMS_COMMAND_BUFFER_SIZE)) { int ch, bs; - for (ch = end + 1; ch > pos; ch--) + for (ch = end; ch > pos; ch--) buffer[ch] = buffer[ch - 1]; fprintf(stdout,buffer + pos); for (bs = 0; bs < (end - pos + 1); bs++) |