From 606f65496cc43e254039329a74a87f0615b2527a Mon Sep 17 00:00:00 2001 From: Antiklesys Date: Sat, 7 Jun 2025 16:46:44 +0800 Subject: [PATCH] Update iclass.c Signed-off-by: Antiklesys --- armsrc/iclass.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/armsrc/iclass.c b/armsrc/iclass.c index 8028b0ce3..5acda350c 100644 --- a/armsrc/iclass.c +++ b/armsrc/iclass.c @@ -614,9 +614,8 @@ int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf) { goto send; } }else{ //For SE cards we have to account for different SIO lengths depending if a standard or custom key is used - uint8_t sio_size[8] = {0}; - memcpy(sio_size,emulator + (current_page * page_size) + (6 * 8), PICOPASS_BLOCK_SIZE); - if (block == 5 + ((sio_size[1]+12)/8)){ + uint8_t *sio = emulator + (current_page * page_size) + (6 * 8); + if (block == (5 + ((sio[1] + 12) / 8))) { goto send; } } @@ -814,9 +813,8 @@ int do_iclass_simulation(int simulationMode, uint8_t *reader_mac_buf) { goto send; } }else{ //For SE cards we have to account for different SIO lengths depending if a standard or custom key is used - uint8_t sio_size[8] = {0}; - memcpy(sio_size,emulator + (current_page * page_size) + (6 * 8), PICOPASS_BLOCK_SIZE); - if (block == 5 + ((sio_size[1]+12)/8)){ + uint8_t *sio = emulator + (current_page * page_size) + (6 * 8); + if (block == (5 + ((sio[1] + 12) / 8))) { goto send; } }