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:
parent
b9c0bf271d
commit
cedcc6634b
|
|
@ -165,7 +165,7 @@ static int read_auth_container(struct spl_image_info *spl_image)
|
|||
int ret;
|
||||
int i;
|
||||
|
||||
container = malloc(sizeof(struct container_hdr));
|
||||
container = malloc(CONTAINER_HDR_ALIGNMENT);
|
||||
if (!container)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue