diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/system/fwtool/Makefile | 2 | ||||
-rw-r--r-- | package/system/fwtool/src/fwtool.c | 4 |
2 files changed, 4 insertions, 2 deletions
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; |