diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-02-03 16:04:13 -0600 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2012-02-03 16:04:13 -0600 |
commit | 7f0ad21d1552479dfdf6b6dddae9bb3c513f04b1 (patch) | |
tree | 2e5cf81ec9a7ffa5b68a050b5ca32f9e09017bdf /cpukit/libmisc | |
parent | PR 2012 - mdump/wdump shell cmds handle length arg incorrectly; add ldump cmd (diff) | |
download | rtems-7f0ad21d1552479dfdf6b6dddae9bb3c513f04b1.tar.bz2 |
PR 2001/shell - medit command argument parsing correction
"medit" overran the argument list, choking on the NULL pointer
following the last argument.
Note that "medit" still only does byte-sized accesses, which limits
its usefulness on most systems.
Author: Werner Almesberger <werner@almesberger.net>
Signed-off-by: Sebastien Bourdeauducq <sebastien@milkymist.org>
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r-- | cpukit/libmisc/shell/main_medit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libmisc/shell/main_medit.c b/cpukit/libmisc/shell/main_medit.c index 7905fbe689..aed3153a80 100644 --- a/cpukit/libmisc/shell/main_medit.c +++ b/cpukit/libmisc/shell/main_medit.c @@ -55,7 +55,7 @@ int rtems_shell_main_medit( * Now edit the memory */ n = 0; - for (i=2 ; i<=argc ; i++) { + for (i=2 ; i<argc ; i++) { unsigned char tmpc; if ( rtems_string_to_unsigned_char(argv[i], &tmpc, NULL, 0) ) { |