Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

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) ...@@ -249,6 +249,14 @@ bool SourceData::FileData::readFile(FileAccess& file)
m_pBuf = nullptr; m_pBuf = nullptr;
m_size = 0; 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; 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