changeset 1295:5e8ec925adf2

Improve image size/length check
author gthomas
date Thu, 09 Oct 2003 21:34:03 +0000
parents 162280f0d804
children 498ac6b4af79
files packages/redboot/current/ChangeLog packages/redboot/current/src/flash.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog
+++ b/packages/redboot/current/ChangeLog
@@ -1,5 +1,8 @@
 2003-10-09  Gary Thomas  <gary@mlbassoc.com>
 
+	* src/flash.c (fis_create): Check whole length of image, not just 
+	effective size, when validating addresses.
+
 	* src/net/net_io.c (net_init): 
 	* include/net/net.h: Rework handling of multiple network devices.  All
 	devices will now be initialized, with either the first or the default
--- a/packages/redboot/current/src/flash.c
+++ b/packages/redboot/current/src/flash.c
@@ -701,7 +701,7 @@ fis_create(int argc, char *argv[])
 #endif
     if (flash_addr_set &&
         ((stat = flash_verify_addr((void *)flash_addr)) ||
-         (stat = flash_verify_addr((void *)(flash_addr+img_size-1))))) {
+         (stat = flash_verify_addr((void *)(flash_addr+length-1))))) {
         _show_invalid_flash_address(flash_addr, stat);
         return;
     }