This is an automated email from Gerrit.

Marc Schink ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/4534

-- gerrit

commit 80afe762004baaba3d8115048791017f41ddfac3
Author: Marc Schink <[email protected]>
Date:   Wed Apr 4 09:50:40 2018 +0200

    target: Fix segfault for 'mem2array'
    
    Change-Id: I02bf46cc8bd317abbb721a8c75d7cbfac99eb34e
    Signed-off-by: Marc Schink <[email protected]>

diff --git a/src/target/target.c b/src/target/target.c
index 75555c1..2692212 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -4128,8 +4128,9 @@ static int target_mem2array(Jim_Interp *interp, struct 
target *target, int argc,
         * argv[3] = memory address
         * argv[4] = count of times to read
         */
+
        if (argc < 4 || argc > 5) {
-               Jim_WrongNumArgs(interp, 1, argv, "varname width addr nelems 
[phys]");
+               Jim_WrongNumArgs(interp, argc, argv, "varname width addr nelems 
[phys]");
                return JIM_ERR;
        }
        varname = Jim_GetString(argv[0], &len);

-- 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to