firmware-utils: bcm4908img: fix extracting cferom
[openwrt/openwrt.git] / tools / firmware-utils / 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;