Skip to content

Commit

Permalink
Fix crash when Le is None while formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-dron committed Apr 4, 2024
1 parent 89847f5 commit e2ddee2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtualsmartcard/src/vpicc/virtualsmartcard/cards/PTEID.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def formatResult(self, ins, p1, p2, le, data, sw):
r = R_APDU(inttostring(SW["NORMAL_REST"] +
min(0xff, len(data) ))).render()
else:

if le is None:
le = 0

r = Iso7816OS.formatResult(self, Iso7816OS.seekable(ins), le,
data, sw, False)
return r
Expand Down

0 comments on commit e2ddee2

Please sign in to comment.