From fc54e9a090eed9f68da950130b9b96193dc5bb09 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Jan 24 2008 14:05:28 +0000 Subject: - merged in 3.3.8b -> drop following patches: qt-3.3.6-fontrendering-punjabi-209970.patch qt-3.3.6-fontrendering-or_IN-209098.patch qt-3.3.6-fontrendering-gu-228451.patch qt-font-default-subst.diff 0076-fix-qprocess.diff 0082-fix-qdatetime-fromstring.diff qt-x11-free-3.3.8-bz#243722-mysql.patch qt3-CVE-2007-3388.patch utf8-bug-qt3-CVE-2007-0242.diff qt-3.3.6-bz#292941-CVE-2007-4137.patch --- diff --git a/0076-fix-qprocess.diff b/0076-fix-qprocess.diff deleted file mode 100644 index 78716ee..0000000 --- a/0076-fix-qprocess.diff +++ /dev/null @@ -1,19 +0,0 @@ -qt-bugs@ issue : none -bugs.kde.org number : none -applied: no -author: from trolltech - -Fixes a regression in QProgress::writeToStdin() - - ---- src/kernel/qprocess.cpp -+++ src/kernel/qprocess.cpp -@@ -727,7 +727,7 @@ void QProcess::closeStdinLaunch() - void QProcess::writeToStdin( const QString& buf ) - { - QByteArray tmp = buf.local8Bit(); -- tmp.resize( tmp.size() - 1 ); // drop the implicit \0 -+ tmp.resize( qstrlen( tmp.data() ) ); - writeToStdin( tmp ); - } - diff --git a/0082-fix-qdatetime-fromstring.diff b/0082-fix-qdatetime-fromstring.diff deleted file mode 100644 index 2aab953..0000000 --- a/0082-fix-qdatetime-fromstring.diff +++ /dev/null @@ -1,20 +0,0 @@ -qt-bugs@ issue : 153183 -bugs.kde.org number : -applied: yes -author: woebbeking@kde.org - -In Qt 3.3.8 QDateTime::fromString() has an off by one regression: -- Thu Mar 3 19:45:58 2005 -> invalid QDateTime -- Thu Mar 13 19:45:58 2005 -> Mar 1 2005 - ---- src/tools/qdatetime.cpp -+++ src/tools/qdatetime.cpp -@@ -2485,7 +2485,7 @@ - return dt; - } - #endif -- int day = s.mid( firstSpace + 4, 2 ).simplifyWhiteSpace().toInt(); -+ int day = s.mid( firstSpace + 5, 2 ).simplifyWhiteSpace().toInt(); - int year = s.right( 4 ).toInt(); - QDate date( year, month, day ); - QTime time; diff --git a/qt-3.3.6-bz#292941-CVE-2007-4137.patch b/qt-3.3.6-bz#292941-CVE-2007-4137.patch deleted file mode 100644 index 06ae9e5..0000000 --- a/qt-3.3.6-bz#292941-CVE-2007-4137.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/codecs/qutfcodec.cpp -+++ src/codecs/qutfcodec.cpp -@@ -165,7 +165,7 @@ public: - QString toUnicode(const char* chars, int len) - { - QString result; -- result.setLength( len ); // worst case -+ result.setLength( len + 1 ); // worst case - QChar *qch = (QChar *)result.unicode(); - uchar ch; - int error = -1; diff --git a/qt-3.3.6-fontrendering-gu-228451.patch b/qt-3.3.6-fontrendering-gu-228451.patch deleted file mode 100644 index c20fea3..0000000 --- a/qt-3.3.6-fontrendering-gu-228451.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -pruN qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp ---- qt-x11-free-3.3.6.org/src/kernel/qscriptengine_x11.cpp 2007-02-13 14:35:30.000000000 +0530 -+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2007-02-13 14:37:58.000000000 +0530 -@@ -226,7 +226,7 @@ static const unsigned char indicForms[0x - Invalid, VowelMark, VowelMark, VowelMark, - Invalid, IndependentVowel, IndependentVowel, IndependentVowel, - IndependentVowel, IndependentVowel, IndependentVowel, IndependentVowel, -- Invalid, IndependentVowel, Invalid, IndependentVowel, -+ IndependentVowel, IndependentVowel, Invalid, IndependentVowel, - - IndependentVowel, IndependentVowel, Invalid, IndependentVowel, - IndependentVowel, Consonant, Consonant, Consonant, diff --git a/qt-3.3.6-fontrendering-or_IN-209098.patch b/qt-3.3.6-fontrendering-or_IN-209098.patch deleted file mode 100644 index 6a87988..0000000 --- a/qt-3.3.6-fontrendering-or_IN-209098.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-13 13:21:37.000000000 +0800 -+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-13 13:42:11.000000000 +0800 -@@ -280,7 +280,7 @@ - Consonant, Consonant, Consonant, Consonant, - - Consonant, Invalid, Consonant, Consonant, -- Invalid, Invalid, Consonant, Consonant, -+ Invalid, Consonant, Consonant, Consonant, - Consonant, Consonant, Unknown, Unknown, - Nukta, Other, Matra, Matra, - -@@ -299,7 +299,7 @@ - Other, Other, Other, Other, - Other, Other, Other, Other, - -- Other, Other, Other, Other, -+ Other, Consonant, Other, Other, - Other, Other, Other, Other, - Other, Other, Other, Other, - Other, Other, Other, Other, -@@ -695,18 +695,18 @@ - None, None, None, None, - - None, None, None, None, -- None, None, None, None, -- None, None, None, None, -- None, None, None, None, -+ None, Below, Below, Below, -+ Below, Below, Below, Below, -+ Below, Below, None, Below, - -- None, None, None, None, -- Below, None, None, None, -- Below, None, None, None, -+ Below, Below, Below, Below, -+ Below, Below, Below, Below, -+ Below, None, Below, Below, - Below, Below, Below, Post, - - Below, None, Below, Below, -- None, None, None, None, -- None, None, None, None, -+ None, Below, Below, Below, -+ Below, Below, None, None, - None, None, Post, Above, - - Post, Below, Below, Below, -@@ -717,14 +717,14 @@ - None, None, None, None, - None, None, Above, Post, - None, None, None, None, -- None, None, None, None, -+ None, None, None, Post, - - None, None, None, None, - None, None, None, None, - None, None, None, None, - None, None, None, None, - -- None, None, None, None, -+ None, Below, None, None, - None, None, None, None, - None, None, None, None, - None, None, None, None, diff --git a/qt-3.3.6-fontrendering-punjabi-209970.patch b/qt-3.3.6-fontrendering-punjabi-209970.patch deleted file mode 100644 index 4c8e562..0000000 --- a/qt-3.3.6-fontrendering-punjabi-209970.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak 2006-10-18 17:55:23.000000000 +0800 -+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp 2006-10-19 11:22:13.226804056 +0800 -@@ -217,7 +217,7 @@ - Other, Other, Other, Other, - Other, Other, Other, Other, - -- StressMark, StressMark, Other, Other, -+ StressMark, StressMark, Consonant, Consonant, - Other, Other, Other, Other, - Other, Other, Other, Other, - Other, Other, Other, Other, diff --git a/qt-font-default-subst.diff b/qt-font-default-subst.diff deleted file mode 100644 index 3e286f7..0000000 --- a/qt-font-default-subst.diff +++ /dev/null @@ -1,77 +0,0 @@ ---- src/kernel/qfontdatabase_x11.cpp -+++ src/kernel/qfontdatabase_x11.cpp -@@ -1589,15 +1589,6 @@ QFontEngine *loadEngine( QFont::Script s - if (script == QFont::Latin) - // add Euro character - FcCharSetAddChar(cs, 0x20ac); -- if (script == QFont::Han_SimplifiedChinese) -- FcCharSetAddChar(cs, 0x3400); -- if (script == QFont::Han_TraditionalChinese){ -- FcCharSetAddChar(cs, 0x3435); -- FcCharSetAddChar(cs, 0xE000); -- FcCharSetAddChar(cs, 0xF6B1); -- } -- if (script == QFont::MiscellaneousSymbols) -- FcCharSetAddChar(cs, 0x2714); - FcPatternAddCharSet(pattern, FC_CHARSET, cs); - FcCharSetDestroy(cs); - } -@@ -1813,7 +1804,11 @@ static QFontEngine *loadFontConfigFont(c - FcPatternPrint(pattern); - #endif - -+ // XftFontMatch calls the right ConfigSubstitute variants, but as we use -+ // FcFontMatch/Sort here we have to do it manually. - FcConfigSubstitute(0, pattern, FcMatchPattern); -+ XftDefaultSubstitute(QPaintDevice::x11AppDisplay(), QPaintDevice::x11AppScreen(), pattern); -+ - // qDebug("1: pattern contains:"); - // FcPatternPrint(pattern); - -@@ -1847,10 +1842,6 @@ static QFontEngine *loadFontConfigFont(c - value.u.s = (const FcChar8 *)cs.data(); - FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue); - } --#ifdef FONT_MATCH_DEBUG -- printf("final pattern contains:\n"); -- FcPatternPrint(pattern); --#endif - } - - if (script != QFont::Unicode) { -@@ -1860,19 +1851,15 @@ static QFontEngine *loadFontConfigFont(c - if (script == QFont::Latin) - // add Euro character - FcCharSetAddChar(cs, 0x20ac); -- if (script == QFont::Han_SimplifiedChinese) -- FcCharSetAddChar(cs, 0x3400); -- if (script == QFont::Han_TraditionalChinese) { -- FcCharSetAddChar(cs, 0x3435); -- FcCharSetAddChar(cs, 0xE000); -- FcCharSetAddChar(cs, 0xF6B1); -- } -- if (script == QFont::MiscellaneousSymbols) -- FcCharSetAddChar(cs, 0x2714); - FcPatternAddCharSet(pattern, FC_CHARSET, cs); - FcCharSetDestroy(cs); - } - -+#ifdef FONT_MATCH_DEBUG -+ printf("final pattern contains:\n"); -+ FcPatternPrint(pattern); -+#endif -+ - QFontEngine *fe = 0; - - for( int jj = (FcGetVersion() >= 20392 ? 0 : 1); jj < 2; ++jj ) { ---- src/kernel/qfontdatabase.cpp -+++ src/kernel/qfontdatabase.cpp -@@ -554,7 +554,7 @@ static const unsigned short sample_chars - // GeometricSymbols, - { 0x2500, 0x0 }, - // MiscellaneousSymbols, -- { 0x2640, 0x0 }, -+ { 0x2640, 0x2714, 0x0 }, - // EnclosedAndSquare, - { 0x2460, 0x0 }, - // Braille, diff --git a/qt-x11-free-3.3.8-bz#243722-mysql.patch b/qt-x11-free-3.3.8-bz#243722-mysql.patch deleted file mode 100644 index 2fe7eab..0000000 --- a/qt-x11-free-3.3.8-bz#243722-mysql.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff -Nur qt-x11-free-3.3.8/src/sql/drivers/mysql/qsql_mysql.cpp qt-x11-free-3.3.8-me/src/sql/drivers/mysql/qsql_mysql.cpp ---- qt-x11-free-3.3.8/src/sql/drivers/mysql/qsql_mysql.cpp 2007-01-11 14:38:34.000000000 +0100 -+++ qt-x11-free-3.3.8-snapshot-me/src/sql/drivers/mysql/qsql_mysql.cpp 2007-05-22 17:15:26.000000000 +0200 -@@ -37,7 +37,6 @@ - #include "qsql_mysql.h" - #include - --#include - #include - #include - #include -@@ -52,6 +51,9 @@ - - QPtrDict *qSqlOpenExtDict(); - -+static int qMySqlConnectionCount = 0; -+static bool qMySqlInitHandledByUser = FALSE; -+ - class QMYSQLOpenExtension : public QSqlOpenExtension - { - public: -@@ -354,9 +356,8 @@ - { - #ifndef Q_NO_MYSQL_EMBEDDED - # if MYSQL_VERSION_ID >= 40000 -- static bool init = FALSE; -- if ( init ) -- return; -+ if ( qMySqlInitHandledByUser || qMySqlConnectionCount > 1 ) -+ return; - - // this should only be called once - // has no effect on client/server library -@@ -366,8 +367,6 @@ - qWarning( "QMYSQLDriver::qServerInit: unable to start server." ); - # endif - } -- qAddPostRoutine(qServerEnd); -- init = TRUE; - - # endif // MYSQL_VERSION_ID - #endif // Q_NO_MYSQL_EMBEDDED -@@ -392,8 +391,10 @@ - d->mysql = (MYSQL *) con; - setOpen( TRUE ); - setOpenError( FALSE ); -+ if (qMySqlConnectionCount == 1) -+ qMySqlInitHandledByUser = TRUE; - } else { -- qServerInit(); -+ qServerInit(); - } - } - -@@ -402,10 +403,15 @@ - qSqlOpenExtDict()->insert( this, new QMYSQLOpenExtension(this) ); - d = new QMYSQLDriverPrivate(); - d->mysql = 0; -+ qMySqlConnectionCount++; - } - - QMYSQLDriver::~QMYSQLDriver() - { -+ qMySqlConnectionCount--; -+ if (qMySqlConnectionCount == 0 && !qMySqlInitHandledByUser) -+ qServerEnd(); -+ - delete d; - if ( !qSqlOpenExtDict()->isEmpty() ) { - QSqlOpenExtension *ext = qSqlOpenExtDict()->take( this ); diff --git a/qt.spec b/qt.spec index 9581106..5e388b3 100644 --- a/qt.spec +++ b/qt.spec @@ -29,16 +29,13 @@ Patch19: qt-3.3.3-gtkstyle.patch Patch20: qt-x11-free-3.3.5-gcc4-buildkey.patch Patch24: qt-x11-free-3.3.5-uic.patch Patch25: qt-x11-free-3.3.8b-uic-multilib.patch -Patch26: qt-3.3.6-fontrendering-punjabi-209970.patch Patch27: qt-3.3.6-fontrendering-ml_IN-209097.patch -Patch28: qt-3.3.6-fontrendering-or_IN-209098.patch Patch29: qt-3.3.8-fontrendering-as_IN-209972.patch Patch31: qt-3.3.6-fontrendering-te_IN-211259.patch Patch32: qt-3.3.6-fontrendering-214371.patch Patch33: qt-3.3.8-fontrendering-#214570.patch Patch34: qt-3.3.6-fontrendering-ml_IN-209974.patch Patch35: qt-3.3.6-fontrendering-ml_IN-217657.patch -Patch36: qt-3.3.6-fontrendering-gu-228451.patch Patch37: qt-3.3.6-fontrendering-gu-228452.patch # immodule patches @@ -54,22 +51,13 @@ Patch100: 0038-dragobject-dont-prefer-unknown.patch Patch101: 0047-fix-kmenu-width.diff Patch102: 0048-qclipboard_hack_80072.patch Patch103: 0056-khotkeys_input_84434.patch -Patch104: qt-font-default-subst.diff patch105: 0073-xinerama-aware-qpopup.patch -Patch106: 0076-fix-qprocess.diff Patch107: 0079-compositing-types.patch Patch108: 0080-net-wm-sync-request-2.patch -Patch109: 0082-fix-qdatetime-fromstring.diff Patch110: 0084-compositing-properties.patch # upstream patches Patch200: qt-x11-free-3.3.4-fullscreen.patch -Patch201: qt-x11-free-3.3.8-bz#243722-mysql.patch - -# security patces -Patch300: qt3-CVE-2007-3388.patch -Patch301: utf8-bug-qt3-CVE-2007-0242.diff -Patch302: qt-3.3.6-bz#292941-CVE-2007-4137.patch %define qt_dirname qt-3.3 %define qtdir %{_libdir}/%{qt_dirname} @@ -279,18 +267,16 @@ for the Qt toolkit. %patch20 -p1 -b .gcc4-buildkey %patch24 -p1 -b .uic %patch25 -p1 -b .uic-multilib -%patch26 -p1 -b .fontrendering-punjabi-bz#209970 %patch27 -p1 -b .fontrendering-ml_IN-bz#209097 -%patch28 -p1 -b .fontrendering-or_IN-bz#209098 %patch29 -p1 -b .fontrendering-as_IN-bz#209972 %patch31 -p1 -b .fontrendering-te_IN-bz#211259 %patch32 -p1 -b .fontrendering-bz#214371 %patch33 -p1 -b .fontrendering-#214570 %patch34 -p1 -b .fontrendering-#209974 %patch35 -p1 -b .fontrendering-ml_IN-217657 -%patch36 -p1 -b .fontrendering-gu-228451 %patch37 -p1 -b .fontrendering-gu-228452 +# immodule patches %if %{immodule} %patch50 -p1 -b .pre %patch51 -p1 @@ -300,25 +286,18 @@ for the Qt toolkit. %patch55 -p1 -b .resetinputcontext %endif +# qt-copy patches %patch100 -p0 -b .0038-dragobject-dont-prefer-unknown %patch101 -p0 -b .0047-fix-kmenu-width %patch102 -p0 -b .0048-qclipboard_hack_80072 %patch103 -p0 -b .0056-khotkeys_input_84434 -%patch104 -p0 -b .qt-font-default-subst %patch105 -p0 -b .0073-xinerama-aware-qpopup -%patch106 -p0 -b .0076-fix-qprocess %patch107 -p0 -b .0079-compositing-types %patch108 -p0 -b .0080-net-wm-sync-request -%patch109 -p0 -b .0082-fix-qdatetime-fromstring %patch110 -p0 -b .0084-compositing-properties +# upstream patches %patch200 -p1 -b .fullscreen -%patch201 -p1 -b .bz#243722-mysql - -# security patches -%patch300 -p1 -b .CVE-2007-3388 -%patch301 -p0 -b .CVE-2007-0242 -%patch302 -p0 -b .CVE-2007-4137 # convert to UTF-8 iconv -f iso-8859-1 -t utf-8 < doc/man/man3/qdial.3qt > doc/man/man3/qdial.3qt_ @@ -595,6 +574,17 @@ rm -rf %{buildroot} %changelog * Thu Jan 24 2008 Than Ngo 3.3.8b-2 - License: GPLv2 or GPLv3 +- merged in 3.3.8b -> drop following patches: + * qt-3.3.6-fontrendering-punjabi-209970.patch + * qt-3.3.6-fontrendering-or_IN-209098.patch + * qt-3.3.6-fontrendering-gu-228451.patch + * qt-font-default-subst.diff + * 0076-fix-qprocess.diff + * 0082-fix-qdatetime-fromstring.diff + * qt-x11-free-3.3.8-bz#243722-mysql.patch + * qt3-CVE-2007-3388.patch + * utf8-bug-qt3-CVE-2007-0242.diff + * qt-3.3.6-bz#292941-CVE-2007-4137.patch * Wed Jan 23 2008 Than Ngo 3.3.8b-1 - update to 3.3.8b, fix License diff --git a/qt3-CVE-2007-3388.patch b/qt3-CVE-2007-3388.patch deleted file mode 100644 index 768c594..0000000 --- a/qt3-CVE-2007-3388.patch +++ /dev/null @@ -1,189 +0,0 @@ ---- qt3/src/widgets/qtextedit.cpp Mon Jul 16 10:44:40 CEST 2007 -+++ qt3/src/widgets/qtextedit.cpp Mon Jul 16 10:44:40 CEST 2007 - -@@ -6349,7 +6349,7 @@ - cur = tag->prev; - if ( !cur ) { - #ifdef QT_CHECK_RANGE -- qWarning( "QTextEdit::optimParseTags: no left-tag for '<" + tag->tag + ">' in line %d.", tag->line + 1 ); -+ qWarning( "QTextEdit::optimParseTags: no left-tag for '<%s>' in line %d.", tag->tag.ascii(), tag->line + 1 ); - #endif - return; // something is wrong - give up - } -@@ -6372,7 +6372,7 @@ - break; - } else if ( !cur->leftTag ) { - #ifdef QT_CHECK_RANGE -- qWarning( "QTextEdit::optimParseTags: mismatching %s-tag for '<" + cur->tag + ">' in line %d.", cur->tag[0] == '/' ? "left" : "right", cur->line + 1 ); -+ qWarning( "QTextEdit::optimParseTags: mismatching %s-tag for '<%s>' in line %d.", cur->tag[0] == '/' ? "left" : "right", cur->tag.ascii(), cur->line + 1 ); - #endif - return; // something is amiss - give up - } ---- qt3/src/sql/qdatatable.cpp Mon Jul 16 10:45:03 CEST 2007 -+++ qt3/src/sql/qdatatable.cpp Mon Jul 16 10:45:03 CEST 2007 - -@@ -1043,8 +1043,8 @@ - return FALSE; - if ( !sqlCursor()->canInsert() ) { - #ifdef QT_CHECK_RANGE -- qWarning("QDataTable::insertCurrent: insert not allowed for " + -- sqlCursor()->name() ); -+ qWarning("QDataTable::insertCurrent: insert not allowed for %s", -+ sqlCursor()->name().latin1() ); - #endif - endInsert(); - return FALSE; -@@ -1117,16 +1117,16 @@ - return FALSE; - if ( sqlCursor()->primaryIndex().count() == 0 ) { - #ifdef QT_CHECK_RANGE -- qWarning("QDataTable::updateCurrent: no primary index for " + -- sqlCursor()->name() ); -+ qWarning("QDataTable::updateCurrent: no primary index for %s", -+ sqlCursor()->name().latin1() ); - #endif - endUpdate(); - return FALSE; - } - if ( !sqlCursor()->canUpdate() ) { - #ifdef QT_CHECK_RANGE -- qWarning("QDataTable::updateCurrent: updates not allowed for " + -- sqlCursor()->name() ); -+ qWarning("QDataTable::updateCurrent: updates not allowed for %s", -+ sqlCursor()->name().latin1() ); - #endif - endUpdate(); - return FALSE; -@@ -1191,8 +1191,8 @@ - return FALSE; - if ( sqlCursor()->primaryIndex().count() == 0 ) { - #ifdef QT_CHECK_RANGE -- qWarning("QDataTable::deleteCurrent: no primary index " + -- sqlCursor()->name() ); -+ qWarning("QDataTable::deleteCurrent: no primary index %s", -+ sqlCursor()->name().latin1() ); - #endif - return FALSE; - } - ---- qt3/src/sql/qsqldatabase.cpp Mon Jul 16 10:45:03 CEST 2007 -+++ qt3/src/sql/qsqldatabase.cpp Mon Jul 16 10:45:03 CEST 2007 - -@@ -234,7 +234,8 @@ - db->open(); - #ifdef QT_CHECK_RANGE - if ( !db->isOpen() ) -- qWarning("QSqlDatabaseManager::database: unable to open database: " + db->lastError().databaseText() + ": " + db->lastError().driverText() ); -+ qWarning("QSqlDatabaseManager::database: unable to open database: %s: %s", -+ db->lastError().databaseText().latin1(), db->lastError().driverText().latin1() ); - #endif - } - return db; -@@ -686,7 +687,7 @@ - if ( !d->driver ) { - #ifdef QT_CHECK_RANGE - qWarning( "QSqlDatabase: %s driver not loaded", type.latin1() ); -- qWarning( "QSqlDatabase: available drivers: " + drivers().join(" ") ); -+ qWarning( "QSqlDatabase: available drivers: %s", drivers().join(" ").latin1() ); - #endif - d->driver = new QNullDriver(); - d->driver->setLastError( QSqlError( "Driver not loaded", "Driver not loaded" ) ); - ---- qt3/src/sql/qsqlindex.cpp Mon Jul 16 10:45:03 CEST 2007 -+++ qt3/src/sql/qsqlindex.cpp Mon Jul 16 10:45:03 CEST 2007 - -@@ -273,7 +273,7 @@ - if ( field ) - newSort.append( *field, desc ); - else -- qWarning( "QSqlIndex::fromStringList: unknown field: '" + f + "'" ); -+ qWarning( "QSqlIndex::fromStringList: unknown field: '%s'", f.latin1()); - } - return newSort; - } - ---- qt3/src/sql/qsqlrecord.cpp Mon Jul 16 10:45:03 CEST 2007 -+++ qt3/src/sql/qsqlrecord.cpp Mon Jul 16 10:45:03 CEST 2007 - -@@ -298,7 +298,7 @@ - return i; - } - #ifdef QT_CHECK_RANGE -- qWarning( "QSqlRecord::position: unable to find field " + name ); -+ qWarning( "QSqlRecord::position: unable to find field %s", name.latin1() ); - #endif - return -1; - } -@@ -313,7 +313,7 @@ - checkDetach(); - if ( !sh->d->contains( i ) ) { - #ifdef QT_CHECK_RANGE -- qWarning( "QSqlRecord::field: index out of range: " + QString::number( i ) ); -+ qWarning( "QSqlRecord::field: index out of range: %d", i ); - #endif - return 0; - } -@@ -344,7 +344,7 @@ - { - if ( !sh->d->contains( i ) ) { - #ifdef QT_CHECK_RANGE -- qWarning( "QSqlRecord::field: index out of range: " + QString::number( i ) ); -+ qWarning( "QSqlRecord::field: index out of range: %d", i ); - #endif // QT_CHECK_RANGE - return 0; - } - ---- qt3/src/tools/qglobal.cpp Mon Jul 16 10:45:03 CEST 2007 -+++ qt3/src/tools/qglobal.cpp Mon Jul 16 10:45:03 CEST 2007 - -@@ -680,7 +680,7 @@ - if ( code != -1 ) - qWarning( "%s\n\tError code %d - %s", msg, code, strerror( code ) ); - else -- qWarning( msg ); -+ qWarning( "%s", msg ); - #endif - #else - Q_UNUSED( msg ); - ---- qt3/src/xml/qsvgdevice.cpp Mon Jul 16 10:45:03 CEST 2007 -+++ qt3/src/xml/qsvgdevice.cpp Mon Jul 16 10:45:03 CEST 2007 - -@@ -978,7 +978,7 @@ - // ### catch references to embedded .svg files - QPixmap pix; - if ( !pix.load( href ) ) { -- qWarning( "QSvgDevice::play: Couldn't load image "+href ); -+ qWarning( "QSvgDevice::play: Couldn't load image %s", href.latin1() ); - break; - } - pt->drawPixmap( QRect( x1, y1, w, h ), pix ); -@@ -1024,8 +1024,8 @@ - break; - } - case InvalidElement: -- qWarning( "QSvgDevice::play: unknown element type " + -- node.nodeName() ); -+ qWarning( "QSvgDevice::play: unknown element type %s", -+ node.nodeName().latin1() ); - break; - }; - -@@ -1111,7 +1111,7 @@ - { - QRegExp reg( QString::fromLatin1("([+-]?\\d*\\.*\\d*[Ee]?[+-]?\\d*)(em|ex|px|%|pt|pc|cm|mm|in|)$") ); - if ( reg.search( str ) == -1 ) { -- qWarning( "QSvgDevice::parseLen: couldn't parse " + str ); -+ qWarning( "QSvgDevice::parseLen: couldn't parse %s ", str.latin1() ); - if ( ok ) - *ok = FALSE; - return 0.0; -@@ -1140,7 +1140,7 @@ - else if ( u == "pc" ) - dbl *= m.logicalDpiX() / 6.0; - else -- qWarning( "QSvgDevice::parseLen: Unknown unit " + u ); -+ qWarning( "QSvgDevice::parseLen: Unknown unit %s", u.latin1() ); - } - if ( ok ) - *ok = TRUE; diff --git a/utf8-bug-qt3-CVE-2007-0242.diff b/utf8-bug-qt3-CVE-2007-0242.diff deleted file mode 100644 index 43e84a9..0000000 --- a/utf8-bug-qt3-CVE-2007-0242.diff +++ /dev/null @@ -1,101 +0,0 @@ ---- src/codecs/qutfcodec.cpp -+++ src/codecs/qutfcodec.cpp -@@ -154,6 +154,7 @@ - - class QUtf8Decoder : public QTextDecoder { - uint uc; -+ uint min_uc; - int need; - bool headerDone; - public: -@@ -167,8 +168,9 @@ - result.setLength( len ); // worst case - QChar *qch = (QChar *)result.unicode(); - uchar ch; -+ int error = -1; - for (int i=0; i= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) { -+ *qch++ = QChar::replacement; - } else { - if (headerDone || QChar(uc) != QChar::byteOrderMark) - *qch++ = uc; -@@ -190,6 +194,7 @@ - } - } else { - // error -+ i = error; - *qch++ = QChar::replacement; - need = 0; - } -@@ -200,12 +205,21 @@ - } else if ((ch & 0xe0) == 0xc0) { - uc = ch & 0x1f; - need = 1; -+ error = i; -+ min_uc = 0x80; - } else if ((ch & 0xf0) == 0xe0) { - uc = ch & 0x0f; - need = 2; -+ error = i; -+ min_uc = 0x800; - } else if ((ch&0xf8) == 0xf0) { - uc = ch & 0x07; - need = 3; -+ error = i; -+ min_uc = 0x10000; -+ } else { -+ // error -+ *qch++ = QChar::replacement; - } - } - } ---- src/tools/qstring.cpp -+++ src/tools/qstring.cpp -@@ -5805,6 +5805,7 @@ - result.setLength( len ); // worst case - QChar *qch = (QChar *)result.unicode(); - uint uc = 0; -+ uint min_uc = 0; - int need = 0; - int error = -1; - uchar ch; -@@ -5822,6 +5823,12 @@ - unsigned short low = uc%0x400 + 0xdc00; - *qch++ = QChar(high); - *qch++ = QChar(low); -+ } else if (uc < min_uc || (uc >= 0xd800 && uc <= 0xdfff) || (uc >= 0xfffe)) { -+ // overlong seqence, UTF16 surrogate or BOM -+ i = error; -+ qch = addOne(qch, result); -+ *qch++ = QChar(0xdbff); -+ *qch++ = QChar(0xde00+((uchar)utf8[i])); - } else { - *qch++ = uc; - } -@@ -5844,14 +5851,17 @@ - uc = ch & 0x1f; - need = 1; - error = i; -+ min_uc = 0x80; - } else if ((ch & 0xf0) == 0xe0) { - uc = ch & 0x0f; - need = 2; - error = i; -+ min_uc = 0x800; - } else if ((ch&0xf8) == 0xf0) { - uc = ch & 0x07; - need = 3; - error = i; -+ min_uc = 0x10000; - } else { - // Error - qch = addOne(qch, result);