]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
mkimage: fix Segmentation Fault when run without "-n name" option
authorWolfgang Denk <wd@denx.de>
Sat, 27 Mar 2010 22:37:46 +0000 (23:37 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 27 Mar 2010 23:13:54 +0000 (00:13 +0100)
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.

Signed-off-by: Wolfgang Denk <wd@denx.de>
tools/mkimage.c

index f71f8e732be6469de8a44b3218b29745f08c3b66..5c3e872906b6e1f27895dd41e11e911473d475f8 100644 (file)
@@ -37,6 +37,7 @@ struct mkimage_params params = {
        .type = IH_TYPE_KERNEL,
        .comp = IH_COMP_GZIP,
        .dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
+       .imagename = "",
 };
 
 /*