mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-12-08 06:09:49 +00:00
Fix size limit on pack_array_header and pack_map_header.
This commit is contained in:
parent
e99331d1ab
commit
ef5d93d4ea
2 changed files with 6 additions and 2 deletions
|
|
@ -633,6 +633,8 @@ class Packer(object):
|
|||
return ret
|
||||
|
||||
def pack_array_header(self, n):
|
||||
if n >= 2**32:
|
||||
raise ValueError
|
||||
self._fb_pack_array_header(n)
|
||||
ret = self._buffer.getvalue()
|
||||
if self._autoreset:
|
||||
|
|
@ -642,6 +644,8 @@ class Packer(object):
|
|||
return ret
|
||||
|
||||
def pack_map_header(self, n):
|
||||
if n >= 2**32:
|
||||
raise ValueError
|
||||
self._fb_pack_map_header(n)
|
||||
ret = self._buffer.getvalue()
|
||||
if self._autoreset:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue