[coreboot] [PATCH] flashrom: Fix a bug in dummyflasher.c special case

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Jun 5 18:03:26 CEST 2009


Fix a bug in dummyflasher.c special case where no type parameter is given.

Tested.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: flashrom-dummyflasher_type_fix/dummyflasher.c
===================================================================
--- flashrom-dummyflasher_type_fix/dummyflasher.c	(Revision 576)
+++ flashrom-dummyflasher_type_fix/dummyflasher.c	(Arbeitskopie)
@@ -35,7 +35,7 @@
 	printf_debug("%s\n", __func__);
 
 	/* "all" is equivalent to specifying no type. */
-	if (!strcmp(dummytype, "all")) {
+	if (dummytype && (!strcmp(dummytype, "all"))) {
 		free(dummytype);
 		dummytype = NULL;
 	}


-- 
http://www.hailfinger.org/

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flashrom_dummyflasher_type_fix.diff
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090605/f97e0165/attachment.ksh>


More information about the coreboot mailing list