From: Felix Fietkau Date: Tue, 12 Feb 2019 14:59:11 +0000 (+0100) Subject: fwtool: do not strip metadata if extracting signature X-Git-Tag: v19.07.0-rc1~1327 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d5681e45f047188bfa6897504c7c6888a57361a7;p=oweals%2Fopenwrt.git fwtool: do not strip metadata if extracting signature This allows the signature to cover the metadata area Signed-off-by: Felix Fietkau --- diff --git a/package/system/fwtool/src/fwtool.c b/package/system/fwtool/src/fwtool.c index e77b8b58e1..505fafcf7a 100644 --- a/package/system/fwtool/src/fwtool.c +++ b/package/system/fwtool/src/fwtool.c @@ -347,8 +347,10 @@ extract_data(const char *name) ret = 0; break; } else if (tr.type == FWIMAGE_INFO) { - if (!metadata_file) + if (!metadata_file) { + dbuf.file_len += data_len + sizeof(tr); break; + } hdr = buf; data_len -= sizeof(*hdr);