Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.10.1
-
None
-
Windows 7 64 bit
msvc2015
Description
QImage::reinterpretAsFormat does not contain check if d==null after detach(), but d==null is possible when out of memory.
Example:
#include <QList>
#include <QImage>
int main(int argc, char *argv[])
{
QList<QImage> images;
int h = 10000;
while (true) {
int w = h / 2;
QImage img = QImage(h, w, QImage::Format_ARGB32_Premultiplied);
if (img.isNull())
images << img;
}
QImage img = images.at(0);
img.reinterpretAsFormat(QImage::Format_ARGB32);
}
Attachments
For Gerrit Dashboard: QTBUG-70785 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
241676,4 | Add missing null checks after detach | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |