Make sure the address variable is initialized to zero - it is only set when a
[base address] parameter is supplied on the command line... This patch fixes random segfaults when using 'cbfstool add'. Signed-off-by: Ward Vandewege <ward@gnu.org> Acked-by: Myles Watson <mylesgw@gmail.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4363 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
da8336176e
commit
ecf4ef0b26
|
@ -238,7 +238,7 @@ int select_component_type(char *s)
|
|||
int add_handler(struct rom *rom, int argc, char **argv)
|
||||
{
|
||||
unsigned int type = CBFS_COMPONENT_NULL;
|
||||
unsigned long address;
|
||||
unsigned long address = 0;
|
||||
|
||||
if ((argc < 3) || (argc > 4)) {
|
||||
add_usage();
|
||||
|
|
Loading…
Reference in New Issue