* [U-Boot] [PATCH] tools: mkimage: Check for datafile when type is script
@ 2018-04-22 5:11 Alex Kiernan
2018-04-29 21:04 ` [U-Boot] " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Alex Kiernan @ 2018-04-22 5:11 UTC (permalink / raw)
To: u-boot
If generating a script image and no datafile has been passed in, mkimage
dies with SIGSEGV:
#0 __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
#1 0x0000000000403818 in main
at tools/mkimage.c:503
Add explicit test for datafile to fix this.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
tools/mkimage.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/mkimage.c b/tools/mkimage.c
index 4e56182..32e07be 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -301,6 +301,8 @@ static void process_args(int argc, char **argv)
else if (!params.datafile)
usage("Missing data file for auto-FIT (use -d)");
} else if (type != IH_TYPE_INVALID) {
+ if (type == IH_TYPE_SCRIPT && !params.datafile)
+ usage("Missing data file for script (use -d)");
params.type = type;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] tools: mkimage: Check for datafile when type is script
2018-04-22 5:11 [U-Boot] [PATCH] tools: mkimage: Check for datafile when type is script Alex Kiernan
@ 2018-04-29 21:04 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2018-04-29 21:04 UTC (permalink / raw)
To: u-boot
On Sun, Apr 22, 2018 at 05:11:17AM +0000, Alex Kiernan wrote:
> If generating a script image and no datafile has been passed in, mkimage
> dies with SIGSEGV:
>
> #0 __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
> #1 0x0000000000403818 in main
> at tools/mkimage.c:503
>
> Add explicit test for datafile to fix this.
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180429/723f07f2/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-29 21:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-22 5:11 [U-Boot] [PATCH] tools: mkimage: Check for datafile when type is script Alex Kiernan
2018-04-29 21:04 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.