Although, it is not possible on Linux (which always uses /tmp)
the compiler complains about possible snprintf() truncation.
Simplest fix is to just increase the size of the filename variable.
Fixes: be22019a58c4 ("test: restore cfgfile tests")
Cc: [email protected]
Signed-off-by: Stephen Hemminger <[email protected]>
---
app/test/test_cfgfile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_cfgfile.c b/app/test/test_cfgfile.c
index b189d9d7a5..823b48e1fa 100644
--- a/app/test/test_cfgfile.c
+++ b/app/test/test_cfgfile.c
@@ -148,7 +148,7 @@ static int
test_cfgfile_realloc_sections(void)
{
struct rte_cfgfile *cfgfile;
- char filename[PATH_MAX];
+ char filename[PATH_MAX + NAME_MAX];
int ret;
const char *value;
--
2.51.0