|
From: openocd-gerrit <ope...@us...> - 2023-07-22 20:16:40
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main OpenOCD repository".
The branch, master has been updated
via 218f6c0181633057a892a8724c506b10b9f6afaa (commit)
from d57b2448eea7fac0d5ccf8b047adf0a57a557cb5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 218f6c0181633057a892a8724c506b10b9f6afaa
Author: eolson <eri...@se...>
Date: Thu Jun 22 13:02:21 2023 -0500
target/riscv: Add null pointer check before right shift for bscan tunneling.
Change-Id: I5d4764c777f33d48705b3e5273eb840c13cfbfb7
Signed-off-by: eolson <eri...@se...>
Reviewed-on: https://review.openocd.org/c/openocd/+/7814
Reviewed-by: Antonio Borneo <bor...@gm...>
Tested-by: jenkins
Reviewed-by: Jan Matyas <jan...@co...>
diff --git a/src/target/riscv/batch.c b/src/target/riscv/batch.c
index 8ec043efb..d39967e4d 100644
--- a/src/target/riscv/batch.c
+++ b/src/target/riscv/batch.c
@@ -115,8 +115,10 @@ int riscv_batch_run(struct riscv_batch *batch)
if (bscan_tunnel_ir_width != 0) {
/* need to right-shift "in" by one bit, because of clock skew between BSCAN TAP and DM TAP */
- for (size_t i = 0; i < batch->used_scans; ++i)
- buffer_shr((batch->fields + i)->in_value, DMI_SCAN_BUF_SIZE, 1);
+ for (size_t i = 0; i < batch->used_scans; ++i) {
+ if ((batch->fields + i)->in_value)
+ buffer_shr((batch->fields + i)->in_value, DMI_SCAN_BUF_SIZE, 1);
+ }
}
for (size_t i = 0; i < batch->used_scans; ++i)
-----------------------------------------------------------------------
Summary of changes:
src/target/riscv/batch.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
hooks/post-receive
--
Main OpenOCD repository
|