diff --git a/src/FDM/ExternalPipe/ExternalPipe.cxx b/src/FDM/ExternalPipe/ExternalPipe.cxx index 312fe1d3d..12a738bf6 100644 --- a/src/FDM/ExternalPipe/ExternalPipe.cxx +++ b/src/FDM/ExternalPipe/ExternalPipe.cxx @@ -44,7 +44,7 @@ FGExternalPipe::FGExternalPipe( double dt, string name ) { valid = true; - buf = new char[sizeof(ctrls) + 1]; + buf = new char[sizeof(char) + sizeof(int) + sizeof(ctrls)]; #ifdef HAVE_MKFIFO fifo_name_1 = name + "1";