target/target: read_memory 64-bit bugfix
authorDaniel Goehring <dgoehrin@os.amperecomputing.com>
Wed, 21 Sep 2022 23:17:04 +0000 (17:17 -0600)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 23 Sep 2022 21:26:44 +0000 (21:26 +0000)
Increase "value_buf" size so it can hold a 64-bit number represented
as a string. Previous size could only hold a 32-bit number string.

Signed-off-by: Daniel Goehring <dgoehrin@os.amperecomputing.com>
Change-Id: If6fbc875236e6ddc59522fbc25db0129eb60ee27
Reviewed-on: https://review.openocd.org/c/openocd/+/7221
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
src/target/target.c

index 794ee2f01d4fafbe23cba53b3ae5e289a19be3f5..783159feccd85d8de0397832f406b53cc9da6fb6 100644 (file)
@@ -4717,7 +4717,7 @@ static int target_jim_read_memory(Jim_Interp *interp, int argc,
                                break;
                        }
 
-                       char value_buf[11];
+                       char value_buf[19];
                        snprintf(value_buf, sizeof(value_buf), "0x%" PRIx64, v);
 
                        Jim_ListAppendElement(interp, result_list,