# HG changeset patch # User asl # Date 1125753021 0 # Node ID ef1d669d4888171642a74ada30d184707bb9158d # Parent 453dff0f4c801dc3c182b45f0181e6b5deeff997 * src/flash.c (fis_create): Print an error if the FIS directory is full when we try to create a new entry. 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,8 @@ +2005-09-03 Isaac Claymore + + * src/flash.c (fis_create): Print an error if the FIS directory is + full when we try to create a new entry. + 2005-07-06 Isaac Claymore * src/fconfig.c: (get_config): Verify the length of the script is 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 @@ -909,6 +909,10 @@ fis_create(int argc, char *argv[]) break; } } + if (i >= fisdir_size/sizeof(*img)) { + diag_printf("Can't find an empty slot in FIS directory!\n"); + return; + } } if (!no_copy) { // Safety check - make sure the address range is not within the code we're running