From 82c254fecf8d3708c256d9d3afac9af720f17aab Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 8 Jul 2014 15:30:53 +0200 Subject: [PATCH] propagator_qnam: Avoid using too much memory The idea here was that the buffer would be maximum 8KiB, not minimum. --- src/mirall/propagator_qnam.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mirall/propagator_qnam.cpp b/src/mirall/propagator_qnam.cpp index 303034dad..ea7b4433b 100644 --- a/src/mirall/propagator_qnam.cpp +++ b/src/mirall/propagator_qnam.cpp @@ -427,7 +427,7 @@ void GETFileJob::slotMetaDataChanged() void GETFileJob::slotReadyRead() { - int bufferSize = qMax(1024*8ll , reply()->bytesAvailable()); + int bufferSize = qMin(1024*8ll , reply()->bytesAvailable()); QByteArray buffer(bufferSize, Qt::Uninitialized); while(reply()->bytesAvailable() > 0) {