fwtool: do not omit final 16 byte when image does not contain signature
This commit is contained in:
parent
29b7da999b
commit
1bcdb25911
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fwtool
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_FLAGS:=nonshared
|
||||
|
||||
|
||||
@ -322,12 +322,14 @@ extract_data(const char *name)
|
||||
if (extract_tail(&dbuf, &tr, sizeof(tr)))
|
||||
break;
|
||||
|
||||
data_len = be32_to_cpu(tr.size) - sizeof(tr);
|
||||
if (tr.magic != cpu_to_be32(FWIMAGE_MAGIC)) {
|
||||
msg("Data not found\n");
|
||||
metadata_keep = true;
|
||||
break;
|
||||
}
|
||||
|
||||
data_len = be32_to_cpu(tr.size) - sizeof(tr);
|
||||
|
||||
if (be32_to_cpu(tr.crc32) != tail_crc32(&dbuf, crc32)) {
|
||||
msg("CRC error\n");
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user