mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-18 20:38:00 +01:00
c: fixes msgpack_zbuffer_write: error checking
This commit is contained in:
parent
e43f57fe1a
commit
254ee80c16
@ -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…
x
Reference in New Issue
Block a user