examples/fips_validation: fix buffer overflow
authorOlivier Matz <olivier.matz@6wind.com>
Mon, 13 Jul 2020 09:36:54 +0000 (11:36 +0200)
committerOlivier Matz <olivier.matz@6wind.com>
Fri, 31 Jul 2020 09:52:28 +0000 (11:52 +0200)
commitc5a4428a783d173721ad0ed5486d058976737af8
tree5cd0168bd46bcf1e374dc3986e7d68f6ac08a41f
parent6636b04b82897816e0e05134f55a578cb7e124bc
examples/fips_validation: fix buffer overflow

If the file name is larger than MAX_STRING_SIZE (64), strcpy()
will overwrite the content of memory.

Replace strcpy() by rte_strscpy(), check its return value, and
increase file_name size to 256.

Fixes: 3d0fad56b74a ("examples/fips_validation: add crypto FIPS application")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
examples/fips_validation/fips_validation.c
examples/fips_validation/fips_validation.h