tools/imagetool: Fix segfault when tparams->verify_header is NULL
authorNicolas Heemeryck <nicolas.heemeryck@gmail.com>
Wed, 20 Apr 2022 21:58:39 +0000 (23:58 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 5 May 2022 19:06:02 +0000 (15:06 -0400)
commit30705cd89271ea05ff6c65552af3dc4f0680a03c
treecc67b6846b91d3ccd707875fd0dab806a3b87631
parent5d834bfa5fa61dc9dff94a92672c0a1185cb3a83
tools/imagetool: Fix segfault when tparams->verify_header is NULL

On some image types like i.MX8 and i.MX8M, the verify_header function
is not implemented.

Before this commit, no check on tparams->verify_header was done causing
a segfault if NULL. Now, a proper error message is printed.

Signed-off-by: Nicolas Heemeryck <nicolas.heemeryck@gmail.com>
tools/imagetool.c