From 13f62ead1bc734e6c96709b32039c0cc3e462dae Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 21 May 2018 22:18:19 +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 6bb6d7d4f..549230c4a 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); + strncpy(secured_path, path, len - 1); } else {