Loading
jsonrpc: Put null byte to the end of response object in req->send_buf
If we print a JSON RPC response object in the req->send_buf simply, garbage will be contained because JSON RPC object is not required to be terminated by a null byte. To exclude garbage from print, put a null byte to the end of the JSON RPC response object before sending. The null byte was not considered for the req->send_buf. Add one byte when allocating or reallocating the req->send_buf for the null byte. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: I1fa0b61db4ffba989da672b0d69662e3813aab8e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18828 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>