QNetworkAccessManager: check the buffer size before allocate
authorMartin Petersson <Martin.Petersson@nokia.com>
Wed, 7 Dec 2011 15:09:29 +0000 (16:09 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 7 Dec 2011 15:27:37 +0000 (16:27 +0100)
commit44bd7c66e20c9fcd4b914d8ac87d5e7989aae11e
tree9e94e7607af2186c23aa690815fd47a9401fa12d
parentebfdb73b75e5ae47ffb6d38c84dad12d21786edc
QNetworkAccessManager: check the buffer size before allocate

The downloadBuffer size should not be larger then the
downloadBufferMaximumSize. I also added a try catch for the allocation
incase we are low on memory, so that we don't crash.

Task-number: QTBUG-23040
Change-Id: Ib9820bc19fc5db994ede20f123f8c167a8d43ff7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
src/network/access/qhttpthreaddelegate.cpp