[cig-commits] r11307 - short/3D/PyLith/trunk/libsrc/meshio
brad at geodynamics.org
brad at geodynamics.org
Mon Mar 3 10:34:10 PST 2008
Author: brad
Date: 2008-03-03 10:34:10 -0800 (Mon, 03 Mar 2008)
New Revision: 11307
Modified:
short/3D/PyLith/trunk/libsrc/meshio/BinaryIO.cc
Log:
Added initialization of a char* to prevent a valgrind error.
Modified: short/3D/PyLith/trunk/libsrc/meshio/BinaryIO.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/meshio/BinaryIO.cc 2008-03-03 15:34:42 UTC (rev 11306)
+++ short/3D/PyLith/trunk/libsrc/meshio/BinaryIO.cc 2008-03-03 18:34:10 UTC (rev 11307)
@@ -26,6 +26,7 @@
std::string bstring = "";
if (numChars > 0) {
char* buffer = new char[numChars+1];
+ buffer[0] = '\0';
fin.read(buffer, sizeof(char)*numChars);
buffer[numChars] = '\0';
More information about the cig-commits
mailing list