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 {