Skip to content
Commit 18378049 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Tom Rini
Browse files

fit: check return value of fit_image_get_data_size()



GCC-10 reports:

In file included from tools/common/image-fit.c:1:
include/image.h: In function ‘fit_image_get_data_and_size’:
./tools/../common/image-fit.c:1015:9: warning: ‘len’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
 1015 |   *size = len;
      |   ~~~~~~^~~~~
./tools/../common/image-fit.c:996:6: note: ‘len’ was declared here
  996 |  int len;
      |      ^~~

Add the missing check of the return value of fit_image_get_data_size().

Fixes: c3c86388 ("add FIT data-position & data-offset property support")
Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
parent 92a19be2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment