X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/af9f7edb75a3aa70168180b6b4073262b3d0548f..c07b7093434b8bcdb038f7c6056cb34f772990d7:/tools/firmware-utils/src/mkzcfw.c?ds=inline diff --git a/tools/firmware-utils/src/mkzcfw.c b/tools/firmware-utils/src/mkzcfw.c index d438f0373..7674e706c 100644 --- a/tools/firmware-utils/src/mkzcfw.c +++ b/tools/firmware-utils/src/mkzcfw.c @@ -297,7 +297,7 @@ static int build_fw(void) /* fill firmware header */ hdr = (struct fw_header *) p; hdr->magic = HOST_TO_LE32(MAGIC_FIRMWARE); - hdr->length = HOST_TO_LE32(buflen) - sizeof(struct fw_header); + hdr->length = HOST_TO_LE32(buflen - sizeof(struct fw_header)); p += sizeof(struct fw_header); /* fill kernel block header */