firmware-utils: bcm4908img: fix extracting cferom
authorRafał Miłecki <rafal@milecki.pl>
Tue, 6 Apr 2021 22:17:40 +0000 (00:17 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 6 Apr 2021 22:22:37 +0000 (00:22 +0200)
Fix offset to extract proper data when image contains vendor header.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
src/bcm4908img.c

index 51c06041d6c1f15c0bff78025c1b9c5188e15ee3..b82303bf6d9cf848beefe6e7d248a80b9822bf7d 100644 (file)
@@ -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;