From 4e25e8b13c9fcc21ba06f8415ade48dd1c24957c Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Wed, 14 Oct 2020 14:51:47 +0200 Subject: [PATCH] Fix string interpolation error Otherwise the interpolation will overrun the buffer --- src/gromacs/mdtypes/inputrec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gromacs/mdtypes/inputrec.cpp b/src/gromacs/mdtypes/inputrec.cpp index 345f6fd5be..b872095f52 100644 --- a/src/gromacs/mdtypes/inputrec.cpp +++ b/src/gromacs/mdtypes/inputrec.cpp @@ -478,7 +478,7 @@ static void pr_pull_coord(FILE* fp, int indent, int c, const t_pull_coord* pcrd) PS("geometry", EPULLGEOM(pcrd->eGeom)); for (g = 0; g < pcrd->ngroup; g++) { - char buf[10]; + char buf[STRLEN]; sprintf(buf, "group[%d]", g); PI(buf, pcrd->group[g]); -- 2.11.4.GIT