Commit abc270c8 authored by Marc Schink's avatar Marc Schink Committed by Tomas Vanek
Browse files

target: Fix segfault for 'mem2array'

Call 'mem2array' without arguments to reproduce the segmentation

Change-Id: I02bf46cc8bd317abbb721a8c75d7cbfac99eb34e
Signed-off-by: default avatarMarc Schink <>

Tested-by: jenkins
Reviewed-by: default avatarAntonio Borneo <>
Reviewed-by: default avatarChristopher Head <>
parent d293583e
......@@ -4131,8 +4131,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, 0, argv, "varname width addr nelems [phys]");
return JIM_ERR;
varname = Jim_GetString(argv[0], &len);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment