From e56a3de232ced62a77c8fab972865a1c13e51eae Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 15 Mar 2026 15:06:51 +0700 Subject: [PATCH] global_platform: fix store_data() returning last chunk only The loop builds up `response` across multiple STORE DATA blocks, but the function returns only `data` - the response from the *last* block. It should return the accumulated response instead. Change-Id: I3e15c8004d1e366e8c3896e559656622f48bb1a2 --- pySim/global_platform/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pySim/global_platform/__init__.py b/pySim/global_platform/__init__.py index f92a08fc..87cf78f0 100644 --- a/pySim/global_platform/__init__.py +++ b/pySim/global_platform/__init__.py @@ -585,7 +585,7 @@ class ADF_SD(CardADF): data, _sw = self._cmd.lchan.scc.send_apdu_checksw(hdr + b2h(chunk) + "00") block_nr += 1 response += data - return data + return h2b(response) put_key_parser = argparse.ArgumentParser() put_key_parser.add_argument('--old-key-version-nr', type=auto_uint8, default=0, help='Old Key Version Number')