From 175b357b21c61e0fd1331f5d982c64f1044c223f Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 26 Mar 2019 14:38:44 +0300 Subject: [PATCH] Avoid SIGSEGV in case of incorrectly recorded command dump processing --- src/GEOM/GEOM_Engine.cxx | 2 ++ 1 file changed, 2 insertions(+) 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++; -- 2.39.2