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
This commit is contained in:
parent
a064b5239d
commit
df042a18ec
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue