]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for
authoreap <eap@opencascade.com>
Thu, 8 Aug 2013 11:05:20 +0000 (11:05 +0000)
committereap <eap@opencascade.com>
Thu, 8 Aug 2013 11:05:20 +0000 (11:05 +0000)
==3768== Conditional jump or move depends on uninitialised value(s)
==3768==    at 0x4C22ED8: strlen (mc_replace_strmem.c:275)
==3768==    by 0x1081E60B: std::string::operator=(char const*) (in /usr/lib64/libstdc++.so.6.0.12)
==3768==    by 0x40757F29: UNV164::Read(std::basic_ifstream<char, std::char_traits<char> >&, UNV164::TRecord&) (UNV164_Structure.cxx:49)

src/DriverUNV/UNV164_Structure.cxx

index 64f5187d178ebc5646c22662eca7a8df05f25442..a4cd6c6249f5ed62732344e2633bec5a2c1ee62e 100644 (file)
@@ -42,7 +42,7 @@ void UNV164::Read(std::ifstream& in_stream, TRecord& theUnitsRecord )
     return;
 
   string num_buf;
-  char line[theMaxLineLen];
+  char line[theMaxLineLen] = "";
 
   in_stream >> theUnitsRecord.units_code;
   in_stream.readsome( line, 20 );