mirror of https://gerrit.osmocom.org/pysim
tlv: Don't raise exception if somebody passes empty data to TLV decoder
Change-Id: Id46994029d9b3cd6b67f4f7ee619466602cc8142
This commit is contained in:
parent
c975251a48
commit
e4a6eafc6f
|
@ -232,6 +232,8 @@ class TLV_IE(IE):
|
|||
return self._encode_tag() + self._encode_len(val) + val
|
||||
|
||||
def from_tlv(self, do: bytes):
|
||||
if len(do) == 0:
|
||||
return {}, b''
|
||||
(rawtag, remainder) = self.__class__._parse_tag_raw(do)
|
||||
if rawtag:
|
||||
if rawtag != self.tag:
|
||||
|
|
Loading…
Reference in New Issue