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@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; }
On Fri, Jun 05, 2009 at 06:03:26PM +0200, Carl-Daniel Hailfinger wrote:
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@gmx.net
Indeed, segfaults without this patch.
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Uwe.
On 05.06.2009 19:00, Uwe Hermann wrote:
On Fri, Jun 05, 2009 at 06:03:26PM +0200, Carl-Daniel Hailfinger wrote:
Fix a bug in dummyflasher.c special case where no type parameter is given.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Acked-by: Uwe Hermann uwe@hermann-uwe.de
Thanks, r577.
Regards, Carl-Daniel