Author: ward Date: 2009-05-13 22:11:04 +0200 (Wed, 13 May 2009) New Revision: 4283
Modified: trunk/coreboot-v2/util/cbfstool/fs.c Log:
This patch fixes a segfault when a file too large to fit is added to a rom image.
Signed-off-by: Ward Vandewege ward@gnu.org Acked-by: Myles Watson mylesgw@gmail.com
Modified: trunk/coreboot-v2/util/cbfstool/fs.c =================================================================== --- trunk/coreboot-v2/util/cbfstool/fs.c 2009-05-13 20:08:28 UTC (rev 4282) +++ trunk/coreboot-v2/util/cbfstool/fs.c 2009-05-13 20:11:04 UTC (rev 4283) @@ -99,7 +99,7 @@ { /* walk the rom and find an empty file with a base > base, and a large enough size */ unsigned int offset = ntohl(rom->header->offset); - unsigned int ret = -1; + int ret = -1; struct cbfs_file *c = NULL; unsigned long nextoffset, truncoffset; struct cbfs_file *newfile = NULL;