summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-02-03 16:21:53 -0600
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-02-03 16:21:53 -0600
commit750ff7689d7c5f770e2b0716f3a0290c468b9da1 (patch)
tree1bdd8cd3aaca02c25ba17525387d98b9ebf4a261
parentAdd .gitignore. Remove .cvsignore. (diff)
downloadrtems-750ff7689d7c5f770e2b0716f3a0290c468b9da1.tar.bz2
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>
-rw-r--r--cpukit/libmisc/shell/main_medit.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/cpukit/libmisc/shell/main_medit.c b/cpukit/libmisc/shell/main_medit.c
index 2e590d4982..99995c8410 100644
--- a/cpukit/libmisc/shell/main_medit.c
+++ b/cpukit/libmisc/shell/main_medit.c
@@ -8,8 +8,6 @@
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
- *
- * $Id$
*/
#ifdef HAVE_CONFIG_H
@@ -42,7 +40,7 @@ int rtems_shell_main_medit(
pb = (unsigned char*)rtems_shell_str2int(argv[1]);
i = 2;
n = 0;
- while (i<=argc) {
+ while (i<argc) {
pb[n++] = rtems_shell_str2int(argv[i++]) % 0x100;
}