This commit is contained in:
Maximilian Hils 2021-12-20 20:36:40 +01:00 committed by GitHub
parent ace07e7e3c
commit ca646ebd40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,7 @@ def load(file_handle: typing.IO[bytes]) -> TSerializable:
data_length = b""
while c.isdigit():
data_length += c
if len(data_length) > 9:
if len(data_length) > 12:
raise ValueError("not a tnetstring: absurdly large length prefix")
c = file_handle.read(1)
if c != b":":