diff --git a/src/flb_pack.c b/src/flb_pack.c index 524277a20e3..7a09c21b3af 100644 --- a/src/flb_pack.c +++ b/src/flb_pack.c @@ -810,7 +810,7 @@ flb_sds_t flb_msgpack_raw_to_json_sds(const void *in_buf, size_t in_size) tmp_buf = flb_sds_increase(out_buf, realloc_size); if (tmp_buf) { out_buf = tmp_buf; - out_size *= realloc_size; + out_size = flb_sds_alloc(out_buf); } else { flb_errno();