1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0030899: Data Exchange, RWObj_Reader - reading multiline file with more than one line separator leads to memory corruption

Fix misprint in condition.
This commit is contained in:
kgv
2019-08-14 15:06:55 +03:00
committed by bugmaster
parent 8e7dc6f465
commit 5e2477a7bd
2 changed files with 43 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ namespace
// multi-line syntax
aLine[aTailIter] = ' ';
const ptrdiff_t aFullLen = aLine + aTailIter + 1 - &this->Line.First();
if (LineBuffLen < aNbRead + MaxLineLen)
if (LineBuffLen < aFullLen + MaxLineLen)
{
LineBuffLen += MaxLineLen;
this->Line.Resize (0, LineBuffLen - 1, true);