From efed954b259434c2d720ebb03e9eda7ef8f00d0e Mon Sep 17 00:00:00 2001 From: Niel Nielsen Date: Thu, 3 Sep 2026 08:20:33 +0200 Subject: [PATCH] Update maxchunk calculation to use g_conn structure Signed-off-by: Niel Nielsen --- client/src/cmdhw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/cmdhw.c b/client/src/cmdhw.c index f37f81cec..0a2659acc 100644 --- a/client/src/cmdhw.c +++ b/client/src/cmdhw.c @@ -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);