From: OpenOCD-Gerrit <ope...@us...> - 2020-03-17 16:41:39
|
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 140fe7f7145cb1159e9f530067e8acc62a3584b3 (commit) from aff486b6a05e1413520537d0d257e36e433754fd (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 140fe7f7145cb1159e9f530067e8acc62a3584b3 Author: Christopher Head <ch...@za...> Date: Tue Mar 3 13:25:50 2020 -0800 flash/nor: check fill pattern fits in word size Change-Id: Idad527a428ceed2b53f3da41fb0c64bf8e62614a Signed-off-by: Christopher Head <ch...@za...> Reviewed-on: http://openocd.zylin.com/5492 Tested-by: jenkins Reviewed-by: Tomas Vanek <va...@fb...> Reviewed-by: Tarek BOCHKATI <tar...@gm...> diff --git a/src/flash/nor/tcl.c b/src/flash/nor/tcl.c index 3287dd97f..40105b43f 100644 --- a/src/flash/nor/tcl.c +++ b/src/flash/nor/tcl.c @@ -512,6 +512,11 @@ COMMAND_HANDLER(handle_flash_fill_command) return ERROR_COMMAND_SYNTAX_ERROR; } + if ((wordsize < sizeof(pattern)) && (pattern >> (8 * wordsize) != 0)) { + command_print(CMD, "Fill pattern 0x%" PRIx64 " does not fit within %" PRIu32 "-byte word", pattern, wordsize); + return ERROR_FAIL; + } + if (count == 0) return ERROR_OK; ----------------------------------------------------------------------- Summary of changes: src/flash/nor/tcl.c | 5 +++++ 1 file changed, 5 insertions(+) hooks/post-receive -- Main OpenOCD repository |