examples/vhost: fix overflow in argument parsing
authorCheng Jiang <cheng1.jiang@intel.com>
Tue, 27 Apr 2021 03:14:01 +0000 (03:14 +0000)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 4 May 2021 08:21:33 +0000 (10:21 +0200)
commit47afdbbe56554444f16e721bc872c262e245fb97
treef9de0d781b742edfe1bf06d7717c82b70d1772a1
parentd99088431ea5d6bb568c5cb5542688453084dcc6
examples/vhost: fix overflow in argument parsing

Change the way passing args to fix potential overflow in args process.

Coverity issue: 363741
Fixes: 965b06f03582 ("examples/vhost: enhance getopt_long usage")

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