cmd: abootimg: Prevent use of unintialised variable
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 26 Jun 2025 16:38:54 +0000 (17:38 +0100)
committerMattijs Korpershoek <mkorpershoek@kernel.org>
Wed, 2 Jul 2025 10:10:04 +0000 (12:10 +0200)
commit4b9717c6868f2f98b02fbe87a885cfa48a5b9946
treefcf678acb7e7580de113df11410fa50da3957bc0
parenta6732920821a23e00cc3291d8069061bd7d00e67
cmd: abootimg: Prevent use of unintialised variable

Initialise vhdr to prevent its use when uninitialised.

This issue was found with Smatch.

Fixes: 636da2039aea (android: boot: support boot image header version 3 and 4)
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250625-abootimg_fix-v4-1-df7af00e87b0@linaro.org
[mkorpershoek: fixed trivial typo in commit msg]
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
cmd/abootimg.c