[XS] Change in pysim[master]: commands: do not use b2h with a string
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/41236?usp=email ) Change subject: commands: do not use b2h with a string ...................................................................... commands: do not use b2h with a string The function h2b expects a bytearray and must not be used on a string. This is also true for nullstrings (''). Related: OS#6869 Change-Id: I0e28e6ec476901bf19aa0f8640e41c74aa6e3aa2 --- M pySim/commands.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/pySim/commands.py b/pySim/commands.py index f069db4..066a2c4 100644 --- a/pySim/commands.py +++ b/pySim/commands.py @@ -141,7 +141,7 @@ Returns: Tuple of (decoded_data, sw) """ - cmd = cmd_constr.build(cmd_data) if cmd_data else '' + cmd = cmd_constr.build(cmd_data) if cmd_data else b'' lc = i2h([len(cmd)]) if cmd_data else '' le = '00' if resp_constr else '' pdu = ''.join([cla, ins, p1, p2, lc, b2h(cmd), le]) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41236?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I0e28e6ec476901bf19aa0f8640e41c74aa6e3aa2 Gerrit-Change-Number: 41236 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org>
participants (1)
-
laforge