From 750ff7689d7c5f770e2b0716f3a0290c468b9da1 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 3 Feb 2012 16:21:53 -0600 Subject: 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 Signed-off-by: Sebastien Bourdeauducq --- cpukit/libmisc/shell/main_medit.c | 4 +--- 1 file changed, 1 insertion(+), 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