From 053a763aa61a801ac2259ee87aaed4cd140557d9 Mon Sep 17 00:00:00 2001 From: Franck HÉRÉSON Date: Wed, 28 Oct 2009 10:24:55 -0700 Subject: bugfix: stack corruption loading IHex images The Hex parser uses a fixed number of sections. When the number of sections in the file is greater than that, the stack get corrupted and a CHECKSUM ERROR is detected which is very confusing. This checks the number of sections read, and increases IMAGE_MAX_SECTIONS so it works on my file. Signed-off-by: David Brownell --- src/target/image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/image.h') diff --git a/src/target/image.h b/src/target/image.h index d90b544a..551524e3 100644 --- a/src/target/image.h +++ b/src/target/image.h @@ -33,7 +33,7 @@ #endif #define IMAGE_MAX_ERROR_STRING (256) -#define IMAGE_MAX_SECTIONS (128) +#define IMAGE_MAX_SECTIONS (512) #define IMAGE_MEMORY_CACHE_SIZE (2048) -- cgit v1.2.3