Skip to content
Snippets Groups Projects
Commit de8d417a authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

fix off-by-one memory allocation bug

parent 0af9203f
No related branches found
No related tags found
No related merge requests found
...@@ -157,7 +157,7 @@ FixNPHugOMP::FixNPHugOMP(LAMMPS *lmp, int narg, char **arg) : ...@@ -157,7 +157,7 @@ FixNPHugOMP::FixNPHugOMP(LAMMPS *lmp, int narg, char **arg) :
// create a new compute potential energy compute // create a new compute potential energy compute
n = strlen(id) + 3; n = strlen(id) + 4;
id_pe = new char[n]; id_pe = new char[n];
strcpy(id_pe,id); strcpy(id_pe,id);
strcat(id_pe,"_pe"); strcat(id_pe,"_pe");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment