Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.5, 4.8.6, 5.2.1, 5.3.0, 5.3.1
-
None
-
All versions
Description
QIODevice::read(char*,qint64 maxLen) crashes on large Files if maxlen > qin32_MAX in QIODevicePrivateLinearBuffer::read -> wrong cast of maxlen to int
-------------------------------------------------------------------
QFile tFile("c:/bigfile.bin");
char* tData=new char[3000000000];
//tFile.size() = 2227814416
if(tFile.open(QIODevice::ReadOnly))
—
qint64 QIODevice::read(char *data, qint64 maxSize)
.
.
.
do {
// Try reading from the buffer.
int lastReadChunkSize = d->buffer.read(data, maxSize);
QIODevicePrivateLinearBuffer
.
.
.
int read(char* target, int size)