mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +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 {
|
do {
|
||||||
if(zbuf->stream.avail_out < MSGPACK_ZBUFFER_RESERVE_SIZE) {
|
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) {
|
if(deflate(&zbuf->stream, Z_NO_FLUSH) != Z_OK) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user