From 61aa78f5b64c7ef4d4ec30743ac0b665bb2963a3 Mon Sep 17 00:00:00 2001 From: Dano Pernis Date: Fri, 6 Sep 2024 13:48:14 +0200 Subject: [PATCH] Fix creating invalid BBF --- utils/pack_fw.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/pack_fw.py b/utils/pack_fw.py index 93f87027e6..9c7f4a8fd6 100644 --- a/utils/pack_fw.py +++ b/utils/pack_fw.py @@ -105,6 +105,8 @@ def write_version(ver, *, build_number: int): data += getattr(ver, it).to_bytes(1, 'little') data += build_number.to_bytes(2, 'little') data += ver.prerelease.ljust(5, '\0').encode() + if len(data) != 10: + raise ValueError('version must be 10 bytes long') return data