diff --git a/package/system/fwtool/Makefile b/package/system/fwtool/Makefile index 901081c1f4..283be8d77a 100644 --- a/package/system/fwtool/Makefile +++ b/package/system/fwtool/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fwtool -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_FLAGS:=nonshared diff --git a/package/system/fwtool/src/fwtool.c b/package/system/fwtool/src/fwtool.c index 3adc1e0249..89e89514ad 100644 --- a/package/system/fwtool/src/fwtool.c +++ b/package/system/fwtool/src/fwtool.c @@ -328,12 +328,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;