devargs: fix parsing truncation when using format
authorAndrew Rybchenko <arybchenko@solarflare.com>
Wed, 18 Jul 2018 07:23:30 +0000 (08:23 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 20 Jul 2018 09:17:03 +0000 (11:17 +0200)
commit7513bd68ae525c58c19068645e714c9c9232eec7
tree53ff28d9e1952b7d6985948e1847bb9145acdde3
parente4ea1bbd6e643cc28e4c59f2e227b00bdf2b9c65
devargs: fix parsing truncation when using format

Space for string terminating NUL character should be provided to
snprintf() to avoid the last symbol truncation.

Fixes: a23bc2c4e01b ("devargs: add non-variadic parsing function")

Reported-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
lib/librte_eal/common/eal_common_devargs.c