fw_printenv: Fix crash due to incorrect size for malloc'ed string.
authorKristian Amlie <kristian.amlie@northern.tech>
Wed, 4 Apr 2018 08:09:57 +0000 (10:09 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 10 Apr 2018 19:19:15 +0000 (15:19 -0400)
commit8a0b827b1a12cf3e224a4c083de7a1e448356a16
treecaf763d47e8f3f8a4302d8635f524506726089b6
parent2f8ffb0655ccb7f5cc5568a52ff45272b19fa5d3
fw_printenv: Fix crash due to incorrect size for malloc'ed string.

Using sizeof gives the size of the pointer only, not the string. This
could easily lead to crashes when using -l argument.

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
tools/env/fw_env_main.c