Commit 8c83c949 authored by Michael Reeves's avatar Michael Reeves

fix use after free

parent cc6f43b3
......@@ -249,6 +249,14 @@ bool SourceData::FileData::readFile(FileAccess& file)
m_pBuf = nullptr;
m_size = 0;
}
else
{
//null terminate buffer
pBuf[m_size + 1] = 0;
pBuf[m_size + 2] = 0;
pBuf[m_size + 3] = 0;
pBuf[m_size + 4] = 0;
}
return bSuccess;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment