From d6a5ec51a8d4440f9434014bb8e2d1f7cf2b2f48 Mon Sep 17 00:00:00 2001 From: Supreeth Herle Date: Mon, 1 Jun 2020 12:27:51 +0200 Subject: utils.py: Handle parsing of ePDGId TLV with zero length Change-Id: Ie05ae010948884765363bd9dbc2b0d764ff8d42a --- pySim/utils.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3