propagator_qnam: Avoid using too much memory

The idea here was that the buffer would be maximum 8KiB, not minimum.
This commit is contained in:
Olivier Goffart 2014-07-08 15:30:53 +02:00
parent 86bea9a9af
commit 82c254fecf

View file

@ -427,7 +427,7 @@ void GETFileJob::slotMetaDataChanged()
void GETFileJob::slotReadyRead() void GETFileJob::slotReadyRead()
{ {
int bufferSize = qMax(1024*8ll , reply()->bytesAvailable()); int bufferSize = qMin(1024*8ll , reply()->bytesAvailable());
QByteArray buffer(bufferSize, Qt::Uninitialized); QByteArray buffer(bufferSize, Qt::Uninitialized);
while(reply()->bytesAvailable() > 0) { while(reply()->bytesAvailable() > 0) {