diff options
| author | Inada Naoki <songofacandy@gmail.com> | 2022-05-24 19:46:51 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-24 19:46:51 +0900 |
| commit | 500a238028bdebe123b502b07769578b5f0e8a3a (patch) | |
| tree | 9c5796a126485a13c3963a84e30a4542df9b2fe4 /msgpack/fallback.py | |
| parent | b75e3412fb8a2b6d6cd1da1b7063e14f6bfc0337 (diff) | |
| download | msgpack-python-500a238028bdebe123b502b07769578b5f0e8a3a.tar.gz | |
Fix Unpacker max_buffer_length handling (#506)
Diffstat (limited to 'msgpack/fallback.py')
| -rw-r--r-- | msgpack/fallback.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/msgpack/fallback.py b/msgpack/fallback.py index 5f215e9..f560c7b 100644 --- a/msgpack/fallback.py +++ b/msgpack/fallback.py @@ -423,6 +423,8 @@ class Unpacker(object): # Read from file remain_bytes = -remain_bytes + if remain_bytes + len(self._buffer) > self._max_buffer_size: + raise BufferFull while remain_bytes > 0: to_read_bytes = max(self._read_size, remain_bytes) read_data = self.file_like.read(to_read_bytes) |
