Commit 870a3b39 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

protect against circular inclusion of pro/pri files

Task-number: 250574
parent 99fccb6d
......@@ -2024,7 +2024,13 @@ ProFile *ProFileEvaluator::parsedProFile(const QString &fileName)
{
QFileInfo fi(fileName);
if (fi.exists()) {
ProFile *pro = new ProFile(fi.absoluteFilePath());
QString fn = QDir::cleanPath(fi.absoluteFilePath());
foreach (const ProFile *pf, d->m_profileStack)
if (pf->fileName() == fn) {
errorMessage(d->format("circular inclusion of %1").arg(fn));
return 0;
}
ProFile *pro = new ProFile(fn);
if (d->read(pro))
return pro;
delete pro;
......
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