MLK-20663 imx8: Fix malloc issue in container parser

The size used for malloc is wrong, the following read function will
read 1KB to the container header buffer not the size of the header.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Ye Li 2018-12-26 21:42:24 -08:00
parent b9c0bf271d
commit cedcc6634b
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ static int read_auth_container(struct spl_image_info *spl_image)
int ret; int ret;
int i; int i;
container = malloc(sizeof(struct container_hdr)); container = malloc(CONTAINER_HDR_ALIGNMENT);
if (!container) if (!container)
return -ENOMEM; return -ENOMEM;