summaryrefslogtreecommitdiff
path: root/util/cbfstool/add.c
diff options
context:
space:
mode:
authorWard Vandewege <ward@gnu.org>2009-06-18 16:38:35 +0000
committerWard Vandewege <ward@gnu.org>2009-06-18 16:38:35 +0000
commitecf4ef0b26c6bd07380c322d449aacc55f0acbb3 (patch)
tree5f08eef9360b97fddd3de27132f09502d70657a4 /util/cbfstool/add.c
parentda8336176e1b7bfa7c944533136a3a78a3907a7b (diff)
downloadcoreboot-ecf4ef0b26c6bd07380c322d449aacc55f0acbb3.tar.xz
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
Diffstat (limited to 'util/cbfstool/add.c')
-rw-r--r--util/cbfstool/add.c2
1 files changed, 1 insertions, 1 deletions
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();