From b76a3ad3999920ba07d4d55710ea030d09203271 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 21 May 2018 22:56:56 +0200 Subject: [PATCH] Fix warning in gcc 8.1.0 --- src/tests/common-files/gnuplot_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/common-files/gnuplot_i.h b/src/tests/common-files/gnuplot_i.h index 549230c4a..0fbc352b0 100644 --- a/src/tests/common-files/gnuplot_i.h +++ b/src/tests/common-files/gnuplot_i.h @@ -1967,7 +1967,7 @@ bool Gnuplot::get_program_path() size_t len = strlen(path); if (path && len < 4046 * sizeof(char)) { - strncpy(secured_path, path, len - 1); + strncpy(secured_path, path, sizeof(secured_path)); } else {