mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-29 02:21:31 +00:00
tools: kwbimage: Check for maximal kwbimage header size
BootROM loads kwbimage header to L2-SRAM and BootROM reserve only 192 kB for it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
252e7c3a24
commit
78d997f98b
1 changed files with 5 additions and 0 deletions
|
@ -2033,6 +2033,11 @@ static int kwbimage_generate(struct image_tool_params *params,
|
|||
free(image_cfg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (alloc_len > 192*1024) {
|
||||
fprintf(stderr, "Header is too big (%u bytes), maximal kwbimage header size is %u bytes\n", alloc_len, 192*1024);
|
||||
free(image_cfg);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue