From: bfis Date: Wed, 6 Jan 2021 12:22:04 +0000 (+0100) Subject: Avoid 2GB read limitation on SSLIOStream X-Git-Tag: v6.2.0b1~54^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d04e775212ccd2d03e4ee79407c8cb996ae0f738;p=thirdparty%2Ftornado.git Avoid 2GB read limitation on SSLIOStream --- diff --git a/tornado/iostream.py b/tornado/iostream.py index 768b404b1..9d8d9c7fb 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -1587,6 +1587,8 @@ class SSLIOStream(IOStream): # to read (attempting to read may or may not raise an exception # depending on the SSL version) return None + if len(buf) >> 30: + buf = memoryview(buf)[: 1 << 30] try: return self.socket.recv_into(buf, len(buf)) except ssl.SSLError as e: