mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-02 02:20:54 +00:00
Fix Unpacker max_buffer_length handling (#506)
This commit is contained in:
parent
b75e3412fb
commit
500a238028
3 changed files with 24 additions and 17 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue