Do not store more than 10M characters in ExternalCommand output.
BUG: 368674
This commit is contained in:
parent
ec89795326
commit
687e3fc7d4
|
@ -118,6 +118,12 @@ void ExternalCommand::onReadOutput()
|
||||||
{
|
{
|
||||||
const QString s = QString::fromUtf8(readAllStandardOutput());
|
const QString s = QString::fromUtf8(readAllStandardOutput());
|
||||||
|
|
||||||
|
if(m_Output.length() > 10*1024*1024) { // prevent memory overflow for badly corrupted file systems
|
||||||
|
if (report())
|
||||||
|
report()->line() << xi18nc("@info:status", "(Command is printing too much output)");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_Output += s;
|
m_Output += s;
|
||||||
|
|
||||||
if (report())
|
if (report())
|
||||||
|
|
Loading…
Reference in New Issue