From: vsr Date: Tue, 26 Mar 2019 11:38:44 +0000 (+0300) Subject: Avoid SIGSEGV in case of incorrectly recorded command dump processing X-Git-Tag: V9_3_0b2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=175b357b21c61e0fd1331f5d982c64f1044c223f;p=modules%2Fgeom.git Avoid SIGSEGV in case of incorrectly recorded command dump processing --- diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index 8eacebc5a..bbd3f5589 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -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++;