mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
tools: imx8image: fix coverity CID 184234
Fix: CID 184234: (TAINTED_SCALAR) Using tainted variable "header.num_images - 1" as an index into an array "header.img". Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
fc61cc2ca3
commit
df439e938c
1 changed files with 3 additions and 1 deletions
|
@ -666,8 +666,10 @@ static int get_container_image_start_pos(image_t *image_stack, uint32_t align)
|
|||
}
|
||||
|
||||
ret = fread(&header, sizeof(header), 1, fd);
|
||||
if (ret != 1)
|
||||
if (ret != 1) {
|
||||
printf("Failure Read header %d\n", ret);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
fclose(fd);
|
||||
|
||||
|
|
Loading…
Reference in a new issue