openocd/src
Aurelien Jacobs 9d31589d19 cfi: fix write_bank segfault with spansion flash on armv7m
cfi_spansion_write_block() passes an arm_algorithm struct to
target_run_algorithm() which in turn calls armv7m_start_algorithm()
which expect an armv7m_algorithm struct.
As armv7m_algorithm is bigger than arm_algorithm, when
armv7m_start_algorithm() writes in the struct, it overrun the buffer,
writting junk on the stack, which latter on generates a segfault.

This patch ensure we use a properly sized armv7m_algorithm struct
when the target is an armv7m.

Change-Id: I4ab67c15ae4bb72454414a81b92a4231dcdb2239
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Reviewed-on: http://openocd.zylin.com/623
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-05-14 09:30:18 +00:00
..
flash cfi: fix write_bank segfault with spansion flash on armv7m 2012-05-14 09:30:18 +00:00
helper Add value "openbsd" for ocd_HOSTOS. 2012-03-31 04:02:24 +00:00
jtag stlink: export write_debug_reg 2012-04-30 13:04:54 +00:00
pld build: cleanup src/pld directory 2012-02-06 10:42:40 +00:00
rtos build: remove clang unused variable assignment warnings 2012-05-04 08:15:40 +00:00
server gdb_server: Simple close the connection and not exit openocd. 2012-03-19 17:11:48 +00:00
svf build: cleanup src/svf directory 2012-02-06 10:43:34 +00:00
target build: use generic name for arm_algorithm vars 2012-05-14 09:29:02 +00:00
transport transport: remove interface multiple transport warning 2012-03-30 15:51:37 +00:00
xsvf build: cleanup src/xsvf directory 2012-02-06 10:45:43 +00:00
hello.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
hello.h build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
main.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
Makefile.am ecosboard: delete bit-rotted eCos code 2012-03-13 19:11:11 +00:00
openocd.c build: cleanup src/ directory 2012-02-06 10:41:23 +00:00
openocd.h build: cleanup src/ directory 2012-02-06 10:41:23 +00:00