From fd1860abe47cae344f6031fc054eaa7953b97bd6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Feb 2019 15:59:11 +0100 Subject: [PATCH] fwtool: do not strip metadata if extracting signature This allows the signature to cover the metadata area Signed-off-by: Felix Fietkau --- src/fwtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fwtool.c b/src/fwtool.c index e77b8b5..505fafc 100644 --- a/src/fwtool.c +++ b/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); -- 2.30.2