From df042a18ecb2c7a4605f706a12e78878a1ec1050 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Wed, 13 May 2009 20:11:04 +0000 Subject: This patch fixes a segfault when a file too large to fit is added to a rom image. Signed-off-by: Ward Vandewege Acked-by: Myles Watson git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4283 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/cbfstool/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/cbfstool') diff --git a/util/cbfstool/fs.c b/util/cbfstool/fs.c index f617159563..a3a1cc1d3b 100644 --- a/util/cbfstool/fs.c +++ b/util/cbfstool/fs.c @@ -99,7 +99,7 @@ struct cbfs_file * rom_alloc(struct rom *rom, const char *name, unsigned long si { /* 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; -- cgit v1.2.3