From d1a6ef47040dc0ae23d0e2add2040f96ffe7b2bd Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 24 Mar 2026 19:03:13 +0700 Subject: [PATCH] guard , if someone wanted to break pm3 simulation.... which is very like not to happen --- armsrc/seos.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/armsrc/seos.c b/armsrc/seos.c index 520cf6d65..f56f632df 100644 --- a/armsrc/seos.c +++ b/armsrc/seos.c @@ -795,6 +795,11 @@ void SimulateSeos(seos_emulate_req_t *msg) { } uint8_t cmac_size = recvd_cmac_length; + if (cmac_size > 16) { + Dbprintf(_RED_("Get Data failed") ": CMAC size invalid."); + break; + } + if (!generate_cmac(diver_cmac_key, mac_input, mac_input_idx, cmac, msg->encr_alg)) { Dbprintf(_RED_("Get Data failed") ": Failed to create reply CMAC."); break;