Commit 0f8e6ebe authored by Ye Li's avatar Ye Li

MLK-20239-7 imx8qm/qxp: Fix coverity CID 3303250

Fix coverity issue CID 3303250: Untrusted array index read (TAINTED_SCALAR)
tainted_data: Using tainted variable header.num_images - 1 as an index
into an array header.img
Signed-off-by: default avatarYe Li <>
parent 0e653b6a
...@@ -518,8 +518,10 @@ int get_container_image_start_pos(image_t *image_stack, uint32_t align) ...@@ -518,8 +518,10 @@ int get_container_image_start_pos(image_t *image_stack, uint32_t align)
break; break;
} }
if(read(ofd, &header, sizeof(header)) != sizeof(header)) if(read(ofd, &header, sizeof(header)) != sizeof(header)) {
printf("Failure Read header \n"); printf("Failure Read header \n");
close(ofd); close(ofd);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment