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>
(cherry picked from commit
cedcc6634ba143f665bf5dac3926b1b74a403479)
int ret;
int i;
- container = malloc(sizeof(struct container_hdr));
+ container = malloc(CONTAINER_HDR_ALIGNMENT);
if (!container)
return -ENOMEM;