]> git.sur5r.net Git - openocd/commit
target/image: fix undefined behaviour when loading with GDB
authorPaul Fertser <fercerpav@gmail.com>
Sun, 1 Feb 2015 19:19:38 +0000 (22:19 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Wed, 11 Feb 2015 15:34:11 +0000 (15:34 +0000)
commitc8d351b1bf592046cef7dc48d84eb10a1ba93993
tree83152911c11ae6c1550ded09e7f25dfbef17ee59
parent7f000f824bb405d3985256b123f3e4b55dc43b6b
target/image: fix undefined behaviour when loading with GDB

The image struct is malloc'd and hence base_address_set doesn't have a
defined value.

Caught by Valgrind.

Change-Id: Ice15b2299fc768e44e8034eeb93e035076eacd03
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2524
Tested-by: jenkins
Reviewed-by: Stian Skjelstad <stian@nixia.no>
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/image.c