From: Rafał Miłecki Date: Tue, 6 Apr 2021 22:17:40 +0000 (+0200) Subject: firmware-utils: bcm4908img: fix extracting cferom X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=dcbde11af181055f2d1c77ebc19f50c29bbab96e;p=openwrt%2Fstaging%2Fnbd.git firmware-utils: bcm4908img: fix extracting cferom Fix offset to extract proper data when image contains vendor header. Signed-off-by: Rafał Miłecki --- 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;