projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
201a017
)
kwbimage: Fix check variable of checksum
author
Nobuhiro Iwamatsu
<iwamatsu@nigauri.org>
Tue, 10 May 2011 17:33:08 +0000
(17:33 +0000)
committer
Wolfgang Denk
<wd@denx.de>
Thu, 12 May 2011 21:53:41 +0000
(23:53 +0200)
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>
tools/kwbimage.c
patch
|
blob
|
history
diff --git
a/tools/kwbimage.c
b/tools/kwbimage.c
index 964796e9a647666924347ca481f4c969d057784d..f327b079b2180856dce8294cccf700c2ba529b25 100644
(file)
--- a/
tools/kwbimage.c
+++ b/
tools/kwbimage.c
@@
-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 != m
hdr->checkSum)
+ if (calc_
exthdrcsum != ext
hdr->checkSum)
return -FDT_ERR_BADSTRUCTURE; /* exthdr csum not matched */
return 0;