Revert "fwtool: do not omit final 16 byte when image does not contain signature"

This reverts commit 1bcdb25911.
This commit is contained in:
CN_SZTL 2019-10-19 16:56:11 +08:00
parent 4be67f42b8
commit 360f8058fa
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 2 additions and 4 deletions

View File

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fwtool
PKG_RELEASE:=2
PKG_RELEASE:=1
PKG_FLAGS:=nonshared

View File

@ -322,14 +322,12 @@ 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;