mmc-utils: Fix for Firmware Version string printing

Added a local buffer to create a NULL terminated string to print the
Firmware Version instead of attempting to print directly from
ext_csd buffer. The last byte of the Firmware Version field may not
be NULL and the next field may also not be which may cause it to
print garbage.

Tested on x86 platform.

Signed-off-by: Kimito Sakata <kimito.sakata@oracle.com>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Fixes: 89cd01ed865a (mmc_utils: add ffu support)
Link: https://lore.kernel.org/r/20210713053458.1441-1-oracleks043021@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 file changed