mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
kwbimage: Fix check variable of checksum
calc_hdrcsum two times are checked. checksumi of exthdr is not checked. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> CC: Prafulla Wadaskar <prafulla@marvell.com>
This commit is contained in:
parent
201a017c2f
commit
3500e9aed6
1 changed files with 1 additions and 1 deletions
|
@ -356,7 +356,7 @@ static int kwbimage_verify_header (unsigned char *ptr, int image_size,
|
|||
|
||||
calc_exthdrcsum = kwbimage_checksum8 ((void *)exthdr,
|
||||
sizeof(extbhr_t) - sizeof(uint8_t), 0);
|
||||
if (calc_hdrcsum != mhdr->checkSum)
|
||||
if (calc_exthdrcsum != exthdr->checkSum)
|
||||
return -FDT_ERR_BADSTRUCTURE; /* exthdr csum not matched */
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue