mirror of
https://gitea.osmocom.org/sim-card/pysim.git
synced 2026-03-16 18:38:32 +03:00
pySim/ota: Don't modify input argument in OtaDialectSms.encode_cmd
Change-Id: I4c4c44002762696b931ed3580ffe54daf62ffa61
This commit is contained in:
@@ -332,6 +332,7 @@ class OtaDialectSms(OtaDialect):
|
||||
len_cipher = 6 + len_sig + len(apdu)
|
||||
padding = otak.crypt._get_padding(len_cipher, otak.crypt.blocksize)
|
||||
pad_cnt = len(padding)
|
||||
apdu = bytes(apdu) # make a copy so we don't modify the input data
|
||||
apdu += padding
|
||||
|
||||
kic = {'key': otak.kic_idx, 'algo': otak.algo_crypt}
|
||||
|
||||
Reference in New Issue
Block a user