1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0031369: Foundation Classes, Standard_ReadBuffer - access violation on second ::ReadChunk() call after read failure

Standard_ReadBuffer::readRawDataChunk() - do not increment NULL pointer and return invalid address.
This commit is contained in:
kgv 2020-08-28 14:24:40 +03:00 committed by bugmaster
parent 90bc1adb77
commit 68a2329305

View File

@ -100,6 +100,11 @@ private:
template<typename Stream_T>
char* readRawDataChunk (Stream_T& theStream)
{
if (myBufferPtr == NULL)
{
return NULL;
}
myBufferPtr += myChunkLen;
if (myBufferPtr < myBufferEnd)
{