[coreboot] [v2] r4363 - trunk/coreboot-v2/util/cbfstool

svn at coreboot.org svn at coreboot.org
Thu Jun 18 18:38:36 CEST 2009


Author: ward
Date: 2009-06-18 18:38:35 +0200 (Thu, 18 Jun 2009)
New Revision: 4363

Modified:
   trunk/coreboot-v2/util/cbfstool/add.c
Log:

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 at gnu.org>
Acked-by: Myles Watson <mylesgw at gmail.com>



Modified: trunk/coreboot-v2/util/cbfstool/add.c
===================================================================
--- trunk/coreboot-v2/util/cbfstool/add.c	2009-06-18 10:05:41 UTC (rev 4362)
+++ trunk/coreboot-v2/util/cbfstool/add.c	2009-06-18 16:38:35 UTC (rev 4363)
@@ -238,7 +238,7 @@
 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();





More information about the coreboot mailing list