aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-02-12 15:59:11 +0100
committerFelix Fietkau <nbd@nbd.name>2019-02-12 16:41:38 +0100
commitd5681e45f047188bfa6897504c7c6888a57361a7 (patch)
treea8e0ff484959503ecff4ee6d188145ceb2623f48 /package
parentdb93949aa395198bbd647827a1f8220e78fbaf3e (diff)
downloadupstream-d5681e45f047188bfa6897504c7c6888a57361a7.tar.gz
upstream-d5681e45f047188bfa6897504c7c6888a57361a7.tar.bz2
upstream-d5681e45f047188bfa6897504c7c6888a57361a7.zip
fwtool: do not strip metadata if extracting signature
This allows the signature to cover the metadata area Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/system/fwtool/src/fwtool.c4
1 files changed, 3 insertions, 1 deletions
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);