diff --git a/core/base/src/TSystem.cxx b/core/base/src/TSystem.cxx index 91e79a157815e..c6cbde6a57925 100644 --- a/core/base/src/TSystem.cxx +++ b/core/base/src/TSystem.cxx @@ -3245,7 +3245,7 @@ int TSystem::CompileMacro(const char *filename, Option_t *opt, if (current==sz-1) { sz = 2*sz; char *newline = new char[sz]; - strcpy(newline,line); + memcpy(newline,line, current); delete [] line; line = newline; }