diff options
author | Ward Vandewege <ward@gnu.org> | 2009-05-13 20:11:04 +0000 |
---|---|---|
committer | Ward Vandewege <ward@gnu.org> | 2009-05-13 20:11:04 +0000 |
commit | df042a18ecb2c7a4605f706a12e78878a1ec1050 (patch) | |
tree | 013ae409ea28b3ec106a7bd5a289074311f5a528 /util | |
parent | a064b5239dd8cda663af5d99603ff21492ca52d7 (diff) | |
download | coreboot-df042a18ecb2c7a4605f706a12e78878a1ec1050.tar.xz |
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>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4283 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r-- | util/cbfstool/fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |