https://bugzilla.novell.com/show_bug.cgi?id=411570 Summary: libqt4: SEGFAULT in QImage::QImage() Product: openSUSE 10.2 Version: Final Platform: PC OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: X11 3rd Party AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: stvdo@gmx.net QAContact: sndirsch@novell.com Found By: Customer Created an attachment (id=229536) --> (https://bugzilla.novell.com/attachment.cgi?id=229536) qimage.cpp patch Using QT4 from libqt4-4.2.1-20 in openSUSE 10.2 we discovered a bug in QImage::QImage(). A simple test program (see below) just segfaults using the Suse libs, but it runs OK when downloading and compiling the QT 4.2.1 sources from Trolltech. A closer look showed that Suse includes a 4.2.1 source that is different from the Trolltech provided one in at least src/gui/image/qimage.cpp. If you look at the source, you will recognize that the Suse code contains d = 0; const int depth = depthForFormat(format); const int bytes_per_line = ((width * d->depth + 31)/32) * 4; Well, initializing d with 0 and then using it as a pointer is a bug, obviously! Trolltech has fixed that sometime after Suse fetched the source for its packages. The attached patch updates the Suse source to the Trolltech source and fixes this bug. simple test program: -------------------- #include <iostream> #include <QtGui/QApplication> #include <QtGui/QImage> int main(int argc, char *argv[]) { QApplication application(argc,argv,false); uchar *pData= new uchar[100*100*32]; std::cerr << "test qimage 0c beg " << (void*)pData << std::endl; QImage* qia = new QImage(pData, 100, 100, QImage::Format_RGB32); std::cerr << "test qimage 0c end" << std::endl; return 0; } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.