diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-21 16:25:09 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-21 16:25:09 +0000 |
commit | 0b95fb805738a7d5334e4f2e47e65ff9c6ba080e (patch) | |
tree | 245333d7a83474bab7398238f445ce3047856701 /cpukit/libmisc/monitor/mon-editor.c | |
parent | 167c6ce11e543e95abc8c2d51da442f212ff2d22 (diff) |
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/libmisc/monitor/mon-editor.c')
-rw-r--r-- | cpukit/libmisc/monitor/mon-editor.c | 2 |
1 files changed, 1 insertions, 1 deletions
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++) |