--- src/kernel/qpixmap_x11.cpp.josh 2006-10-13 23:30:27.000000000 -0400 +++ src/kernel/qpixmap_x11.cpp.josh 2006-10-14 00:31:01.000000000 -0400 @@ -1758,6 +1758,12 @@ QPixmap QPixmap::xForm( const QWMatrix & dbpl = ((w*bpp+31)/32)*4; dbytes = dbpl*h; + if (dbytes != (long long) dbpl*h) { // Integer overflow detection + QPixmap pm; + pm.data->bitmap = data->bitmap; + return pm; + } + #if defined(QT_MITSHM) if ( use_mitshm ) { dptr = (uchar *)xshmimg->data; @@ -1867,6 +1873,11 @@ QPixmap QPixmap::xForm( const QWMatrix & sptr = (uchar *) axi->data; bpp = axi->bits_per_pixel; dbytes = dbpl * h; + if (dbytes != (long long) dbpl*h) { // Integer overflow detection + QPixmap pm; + pm.data->bitmap = data->bitmap; + return pm; + } dptr = (uchar *) malloc(dbytes); Q_CHECK_PTR( dptr ); memset(dptr, 0, dbytes);