From ecf4ef0b26c6bd07380c322d449aacc55f0acbb3 Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Thu, 18 Jun 2009 16:38:35 +0000 Subject: 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 Acked-by: Myles Watson git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4363 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/cbfstool/add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/cbfstool/add.c b/util/cbfstool/add.c index 9950d5bdf9..95b7852983 100644 --- a/util/cbfstool/add.c +++ b/util/cbfstool/add.c @@ -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(); -- cgit v1.2.3