aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSupreeth Herle <herlesupreeth@gmail.com>2020-06-01 12:27:51 +0200
committerSupreeth Herle <herlesupreeth@gmail.com>2020-06-23 13:07:01 +0200
commitd6a5ec51a8d4440f9434014bb8e2d1f7cf2b2f48 (patch)
tree1acb0fba3c857e34cf040a262ae537a0f48979e3
parente61170c0eb85daa8ac5deabc8a62e00c9b33d800 (diff)
utils.py: Handle parsing of ePDGId TLV with zero length
-rw-r--r--pySim/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pySim/utils.py b/pySim/utils.py
index 2ca6165..79a1c1b 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -462,6 +462,10 @@ def dec_epdgid(hexstr):
if tlv[0] != 0x80:
continue
+ # Empty field - Zero length
+ if tlv[1] == 0:
+ continue
+
# First byte in the value has the address type
addr_type = tlv[2][0]
# TODO: Support parsing of IPv4 and IPv6