0031918: Application Framework - New binary format for fast reading part of OCAF...
[occt.git] / src / BinLDrivers / BinLDrivers_DocumentSection.cxx
index 7810355..3ef3d12 100644 (file)
@@ -228,6 +228,7 @@ void BinLDrivers_DocumentSection::ReadTOC
 #endif
   if (aNameBufferSize > 0) {
     theStream.read ((char *)&aBuf[0], (Standard_Size)aNameBufferSize);
+    aBuf[aNameBufferSize] = '\0';
     theSection.myName = (Standard_CString)&aBuf[0];
 
     uint64_t aValue[3];