examples/vhost_blk: fix not null-terminated buffer
authorJin Yu <jin.yu@intel.com>
Fri, 15 May 2020 14:45:02 +0000 (22:45 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 18 May 2020 18:35:57 +0000 (20:35 +0200)
commite2b4cfd6a40d9361928c60834ef676e75d9be9bd
tree7cd948ba378f5ad193810fb2503e4ec3349bbfe2
parentf50560a54b8bd6b52d763213aee40f0164fb4099
examples/vhost_blk: fix not null-terminated buffer

In vhost_blk_bdev_construct: The string buffer may not have
a null terminator if the source string's length is equal to
the buffer size.

Fixes: 91d3e2d42997 ("examples/vhost_blk: refactor to increase readability")

Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-by: Xiaolong Ye <xiaolong.ye@intel.com>
examples/vhost_blk/vhost_blk.c