This is an automated email from Gerrit. Sergey A. Borshch ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1676
-- gerrit commit 19daf3e9e94539124cc839c7dde0462f552259b1 Author: Sergey A. Borshch <[email protected]> Date: Thu Oct 3 16:05:15 2013 +0300 fix lpc2000 flash programming fail. some members of lpc2000_info structure sometimes used uninitialized (cmd51_can_64b for all LPC except LPC800 as example). Init allocated lpc2000_info structure with zeros to avoid this and similar bugs in the future. Note: maybe discarding all cmd51_can_XXXb fields and using cmd51_dst_boundary instead will be a better solution. Signed-off-by: Sergey A. Borshch <[email protected]> Change-Id: Idf116a5b0bf4ea1c39ea0ce308ec2c13bfbd4d8c diff --git a/src/flash/nor/lpc2000.c b/src/flash/nor/lpc2000.c index 3962f30..12814aa 100644 --- a/src/flash/nor/lpc2000.c +++ b/src/flash/nor/lpc2000.c @@ -559,7 +559,8 @@ FLASH_BANK_COMMAND_HANDLER(lpc2000_flash_bank_command) if (CMD_ARGC < 8) return ERROR_COMMAND_SYNTAX_ERROR; - struct lpc2000_flash_bank *lpc2000_info = malloc(sizeof(struct lpc2000_flash_bank)); + struct lpc2000_flash_bank *lpc2000_info = calloc(1, sizeof(*lpc2000_info)); + bank->driver_priv = lpc2000_info; if (strcmp(CMD_ARGV[6], "lpc2000_v1") == 0) { -- ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
