From de8d417aeccdcee893ae50ccb6f47fd41bcf802e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer <akohlmey@gmail.com> Date: Thu, 13 Jul 2017 10:55:13 -0400 Subject: [PATCH] fix off-by-one memory allocation bug --- src/USER-OMP/fix_nphug_omp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-OMP/fix_nphug_omp.cpp b/src/USER-OMP/fix_nphug_omp.cpp index bc3c2cdd5c..75ff393e28 100644 --- a/src/USER-OMP/fix_nphug_omp.cpp +++ b/src/USER-OMP/fix_nphug_omp.cpp @@ -157,7 +157,7 @@ FixNPHugOMP::FixNPHugOMP(LAMMPS *lmp, int narg, char **arg) : // create a new compute potential energy compute - n = strlen(id) + 3; + n = strlen(id) + 4; id_pe = new char[n]; strcpy(id_pe,id); strcat(id_pe,"_pe"); -- GitLab