aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmer@dabbelt.com>2018-06-01 00:30:11 -0700
committerPalmer Dabbelt <palmer@dabbelt.com>2018-06-01 00:30:11 -0700
commitfb9a43d93e302fcde5b9d7acb6ecafc4bf9d7171 (patch)
treec2090b38f7093a13ea304379bca80ef42d5a9dda
parent7a8e6f7868adef7596c135f864ebbdaa60356851 (diff)
downloadriscv-openocd-wip.zip
riscv-openocd-wip.tar.gz
riscv-openocd-wip.tar.bz2
Zero the input bufferwip
-rw-r--r--src/target/riscv/riscv-013.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/target/riscv/riscv-013.c b/src/target/riscv/riscv-013.c
index 3d00d29..547b01f 100644
--- a/src/target/riscv/riscv-013.c
+++ b/src/target/riscv/riscv-013.c
@@ -2024,6 +2024,8 @@ static int read_memory_progbuf(struct target *target, target_addr_t address,
select_dmi(target);
+ memset(buffer, 0, count*size);
+
/* s0 holds the next address to write to
* s1 holds the next data value to write
*/