This is an automated email from Gerrit. "Yasushi SHOJI <yasushi.sh...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6758
-- gerrit commit 387678ba7be7fe6910b2c2237f2e5c5da8d98ac6 Author: Yasushi SHOJI <ya...@spacecubics.com> Date: Mon Nov 29 22:33:27 2021 +0900 target/target: Check checksum_memory before call Make sure checksum_memory is present. Otherwise it'll segfault. Change-Id: If31123323bd8a03282da43505c9604fde735ad0e Signed-off-by: Yasushi SHOJI <ya...@spacecubics.com> diff --git a/src/target/target.c b/src/target/target.c index ed6f655ea..bced08d25 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2531,6 +2531,10 @@ int target_checksum_memory(struct target *target, target_addr_t address, uint32_ LOG_ERROR("Target not examined yet"); return ERROR_FAIL; } + if (!target->type->checksum_memory) { + LOG_ERROR("Target %s doesn't support checksum_memory", target_name(target)); + return ERROR_FAIL; + } retval = target->type->checksum_memory(target, address, size, &checksum); if (retval != ERROR_OK) { --