examples/vhost: check argument length
authorCheng Jiang <cheng1.jiang@intel.com>
Fri, 6 Nov 2020 03:24:01 +0000 (03:24 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:26 +0000 (19:43 +0100)
commit2b7126f5fce80014853a086e12b83b78b6bca6fe
tree4a06fafcf24648a1842b6976b53250e2b72af3ef
parent7dd0d9f29f426c7355427a6f1ce439ff84e433e2
examples/vhost: check argument length

Add args length check before copying to fix the coverity issue.

Coverity issue: 363741
Fixes: 3a04ecb21420 ("examples/vhost: add async vhost args parsing")

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
examples/vhost/main.c