mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-06 17:59:52 +00:00
c: fixes msgpack_zbuffer_write: error checking
This commit is contained in:
parent
e43f57fe1a
commit
254ee80c16
1 changed files with 3 additions and 1 deletions
|
|
@ -107,7 +107,9 @@ int msgpack_zbuffer_write(void* data, const char* buf, unsigned int len)
|
|||
|
||||
do {
|
||||
if(zbuf->stream.avail_out < MSGPACK_ZBUFFER_RESERVE_SIZE) {
|
||||
msgpack_zbuffer_expand(zbuf);
|
||||
if(!msgpack_zbuffer_expand(zbuf)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if(deflate(&zbuf->stream, Z_NO_FLUSH) != Z_OK) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue