Update maxchunk calculation to use g_conn structure

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
Niel Nielsen
2026-09-03 08:20:33 +02:00
committed by GitHub
parent bb42ca8ca7
commit efed954b25
+1 -1
View File
@@ -2340,7 +2340,7 @@ static int CmdBWMUpgrade(const char *Cmd) {
PrintAndLogEx(INFO, "Uploading " _YELLOW_("%zu") " bytes of ESP firmware over the BWM link...", fwlen);
// WRITE chunks (one action byte + as much firmware as fits the negotiated frame)
size_t maxchunk = (size_t)pm3_max_cmd_data_size() - 1;
size_t maxchunk = (size_t)g_conn.max_cmd_data_size - 1;
uint8_t *buf = calloc(1, maxchunk + 1);
if (buf == NULL) {
free(fw);