]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Avoid SIGSEGV in case of incorrectly recorded command dump processing
authorvsr <vsr@opencascade.com>
Tue, 26 Mar 2019 11:38:44 +0000 (14:38 +0300)
committervsr <vsr@opencascade.com>
Tue, 26 Mar 2019 11:38:44 +0000 (14:38 +0300)
src/GEOM/GEOM_Engine.cxx

index 8eacebc5ac70efa590c042572ec0863f7e9ebbe7..bbd3f5589c29b8a288f76993aaa1846d73537691 100644 (file)
@@ -1415,6 +1415,8 @@ void ReplaceVariables(TCollection_AsciiString& theCommand,
         aStartPos = aCommand.Location(i-1, COMMA, 1, aCommand.Length()) + 2;
         aEndPos = aCommand.Location(i, COMMA, 1, aCommand.Length());
       }
+      if (aStartPos == 0 || aEndPos == 0)
+        continue;
 
       if( aCommand.Value( aStartPos ) == O_SQR_BRACKET )
         aStartPos++;