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:
Ward Vandewege 2009-06-18 16:38:35 +00:00
parent da8336176e
commit ecf4ef0b26
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ int select_component_type(char *s)
int add_handler(struct rom *rom, int argc, char **argv) int add_handler(struct rom *rom, int argc, char **argv)
{ {
unsigned int type = CBFS_COMPONENT_NULL; unsigned int type = CBFS_COMPONENT_NULL;
unsigned long address; unsigned long address = 0;
if ((argc < 3) || (argc > 4)) { if ((argc < 3) || (argc > 4)) {
add_usage(); add_usage();