Skip to contentSkip to conversation

mkimage: fix Segmentation Fault when run without "-n name" option

PATCH New Wolfgang Denk 1 participant 2 messages Mar 27, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkimage: fix Segmentation Fault when run without "-n name" option

The restructuring of the mkimage command in commit 89a4d6b1 ("tools:
mkimage: split code into core, default and FIT image specific") introduced a bug that caused mkimage to segfault when run without "-n name" option. Initialize the imagename entry to prevent that.

---
 tools/mkimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tools/mkimage.c +1 -0
index f71f8e7..5c3e872 100644
@@ -37,6 +37,7 @@ struct mkimage_params params = {
 	.type = IH_TYPE_KERNEL,
 	.comp = IH_COMP_GZIP,
 	.dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
+	.imagename = "",
 };
 
 /*
Signature · 1 line
1.6.6.1
author Applied
#1 lore raw

PATCH 1/1 mkimage: fix Segmentation Fault when run without "-n name" option

Quoted 9 lines · In message <[email protected]> you wrote:

The restructuring of the mkimage command in commit 89a4d6b1 ("tools:
mkimage: split code into core, default and FIT image specific") introduced a bug that caused mkimage to segfault when run without "-n name" option. Initialize the imagename entry to prevent that.

---
 tools/mkimage.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Applied.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Be kind to unkind people - they need it the most.