mirror of https://github.com/QMCPACK/qmcpack.git
NULL-terminate buffer when reading PP file.
This commit is contained in:
parent
f74f9531ac
commit
4b76afad97
|
@ -85,7 +85,8 @@ bool ReadFileBuffer::read_contents()
|
|||
}
|
||||
if (myComm) myComm->bcast(length);
|
||||
|
||||
cbuffer = new char[length];
|
||||
cbuffer = new char[length+1];
|
||||
cbuffer[length] = '\0';
|
||||
|
||||
if (myComm == NULL || myComm->rank() == 0)
|
||||
fin->read (cbuffer,length);
|
||||
|
|
Loading…
Reference in New Issue