# HG changeset patch # User gthomas # Date 1188298792 0 # Node ID 82aabda670f8d929dc482cb1b2795134334515a2 # Parent a703e82c8115acbc7b0db45b5e64e6fd4ba074aa Fix memory allocation for FLASH/FIS - could have been wrong if some other function allocated memory first diff --git a/packages/redboot/current/ChangeLog b/packages/redboot/current/ChangeLog --- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,9 @@ +2007-08-28 Gary Thomas + + * src/flash.c (do_flash_init): Memory allocation was slightly + incorrect - 'workspace_end' should always be used to find + the end of available memory. + 2007-08-08 Peter Korsgaard * include/net/http.h: diff --git a/packages/redboot/current/src/flash.c b/packages/redboot/current/src/flash.c --- a/packages/redboot/current/src/flash.c +++ b/packages/redboot/current/src/flash.c @@ -1600,7 +1600,7 @@ do_flash_init(void) return -1; } # else - workspace_end = (unsigned char *)(workspace_end_init-fisdir_size); + workspace_end = (unsigned char *)(workspace_end-fisdir_size); fis_work_block = workspace_end; # endif if (CYGNUM_REDBOOT_FIS_DIRECTORY_BLOCK < 0) {