diff options
author | Lennart Rosam <rosam@sipgate.de> | 2021-11-25 16:19:53 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2021-11-25 16:55:08 +0100 |
commit | c104095c69dd687e8a3a718ac4398b2c45d077aa (patch) | |
tree | 0dbc88ca9e55149c588228cff4157b339e710d67 | |
parent | 931bc66331c78b1c1eb8ce48276c29aea4b691ea (diff) |
fix: Decoder may raise KeyError
This fixes an issue where a KeyError may be raised when 'A5'
is not present in `fcp`
Change-Id: I5bb6131bd76c7bae2a70034c429cae2b380d164f
-rw-r--r-- | pySim/ts_102_221.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py index adb40c1..f145d19 100644 --- a/pySim/ts_102_221.py +++ b/pySim/ts_102_221.py @@ -684,7 +684,7 @@ class CardProfileUICC(CardProfile): fcp_tlv = TLV(FCP_TLV_MAP) fcp = fcp_tlv.parse(fcp_base['62']) # further decode the proprietary information - if fcp['A5']: + if 'A5' in fcp: prop_tlv = TLV(FCP_Proprietary_TLV_MAP) prop = prop_tlv.parse(fcp['A5']) fcp['A5'] = tlv_val_interpret(FCP_prorietary_interpreter_map, prop) |