[openwrt/openwrt] firmware-utils: bcm4908img: fix extracting cferom
LEDE Commits
lede-commits at lists.infradead.org
Thu Apr 8 12:41:00 BST 2021
rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/fe302010d3493286ef1a6a3b440d243208b93a5c
commit fe302010d3493286ef1a6a3b440d243208b93a5c
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Wed Apr 7 00:17:40 2021 +0200
firmware-utils: bcm4908img: fix extracting cferom
Fix offset to extract proper data when image contains vendor header.
Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
(cherry picked from commit dcbde11af181055f2d1c77ebc19f50c29bbab96e)
---
tools/firmware-utils/src/bcm4908img.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/firmware-utils/src/bcm4908img.c b/tools/firmware-utils/src/bcm4908img.c
index 51c06041d6..b82303bf6d 100644
--- a/tools/firmware-utils/src/bcm4908img.c
+++ b/tools/firmware-utils/src/bcm4908img.c
@@ -580,7 +580,7 @@ static int bcm4908img_extract(int argc, char **argv) {
}
if (!strcmp(type, "cferom")) {
- offset = 0;
+ offset = info.cferom_offset;
length = info.bootfs_offset - offset;
if (!length) {
err = -ENOENT;
More information about the lede-commits
mailing list