From 21bae5c73fc04424ea243f9c323a1b72d1105c5e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 1 Jul 2025 16:45:18 +0200 Subject: [PATCH] fix hf 15 readmulti - wrong block count number. It is decreased before to be zero based, but in calc we need number of blocks --- CHANGELOG.md | 1 + client/src/cmdhf15.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aef0c3883..8aac2816a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Fixed `hf 15 readmulti` - fix block calculations (@iceman1001) - Changed `mem load` - now handles UL-C and UL-AES dictionary files (@iceman1001) - Changed `hf mfu sim` - now support UL-C simulation (@iceman1001) - Added `!` - run system commands from inside the client. Potentially dangerous if running client as SUDO, SU, ROOT (@iceman1001) diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 5104ddedc..1dbd32b97 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -2274,7 +2274,7 @@ static int CmdHF15Readmulti(const char *Cmd) { ISO15_ERROR_HANDLING_CARD_RESPONSE(d, resp.length) // 1 byte cmd, 1 lock byte, 4 / 8 bytes block size, 2 crc - if (resp.length > (1 + (blockcnt * (blocksize + 1)) + 2)) { + if (resp.length > (1 + ((blockcnt + 1) * (blocksize + 1)) + 2)) { PrintAndLogEx(WARNING, "got longer response. Check block size!"); }