libfstools: fit: improve fit_volume_find string handling
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 22 Jan 2024 00:41:24 +0000 (01:41 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 22 Jan 2024 00:45:32 +0000 (01:45 +0100)
commit08cd7083cac4bddf88459efa0881ee52858e7d0a
treebf9d436a757b023f13bbb765801c6593995aa34c
parent2171f62615569bace6e53617480d8f233f8f3b94
libfstools: fit: improve fit_volume_find string handling

While string are hardcoded and it's impossible to overflow it, make the
string handling more secure to mute Coverity Scan report by using
strncpy and adding a define for the max size of the DEVPATHSTR.

Fix Coverity Scan CID 1586643:  Security best practices violations
(STRING_OVERFLOW).

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
libfstools/fit.c