Hello community, here is the log from the commit of package scribus checked in at Mon Mar 12 12:02:25 CET 2007. -------- --- KDE/scribus/scribus.changes 2007-03-08 15:06:48.000000000 +0100 +++ /mounts/work_src_done/STABLE/scribus/scribus.changes 2007-03-12 10:05:15.000000000 +0100 @@ -1,0 +2,10 @@ +Mon Mar 12 09:54:04 CET 2007 - pgajdos@suse.cz + +- fixed gcc warnings in beta version: + * program uses possibly exploitable format strings + (format-not-literal.patch) + * program compares a char* pointer with string literal + (string-literal-comparsion.patch) + * added CFLAG -fno-strict-aliasing inside scribus.spec + +------------------------------------------------------------------- New: ---- scribus-1.3.3.7_format-not-literal.patch scribus-1.3.3.7_string-literal-comparsion-b.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ scribus.spec ++++++ --- /var/tmp/diff_new_pack.z25641/_old 2007-03-12 12:02:14.000000000 +0100 +++ /var/tmp/diff_new_pack.z25641/_new 2007-03-12 12:02:14.000000000 +0100 @@ -28,9 +28,11 @@ Provides: scribus-short-words Obsoletes: scribus-i18n-de scribus-i18n-en scribus-i18n-fr scribus-short-words Version: 1.3.3.7 -Release: 7 +Release: 9 Source: %{name}-%{version}.tar.bz2 Patch: %{name}-%{version}_string-literal-comparsion.patch +Patch1: %{name}-%{version}_format-not-literal.patch +Patch2: %{name}-%{version}_string-literal-comparsion-b.patch URL: http://www.scribus.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Open Source Page Layout and Desktop Publishing (DTP) @@ -102,13 +104,15 @@ %prep %setup -q %patch +%patch1 +%patch2 %build . /etc/opt/kde3/common_options update_admin --no-unsermake #autoconf export CFLAGS="$RPM_OPT_FLAGS" -export CXXFLAGS="$RPM_OPT_FLAGS" +export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure \ --prefix=%{prefix} \ --libdir=%{_libdir} \ @@ -171,6 +175,13 @@ %{_prefix}/include/scribus %changelog +* Mon Mar 12 2007 - pgajdos@suse.cz +- fixed gcc warnings in beta version: + * program uses possibly exploitable format strings + (format-not-literal.patch) + * program compares a char* pointer with string literal + (string-literal-comparsion.patch) + * added CFLAG -fno-strict-aliasing inside scribus.spec * Thu Mar 08 2007 - pgajdos@suse.cz - fixed 'warning: comparsion with string literal' (#233016, #228963) - string-literal-comparsion.patch ++++++ scribus-1.3.3.7_format-not-literal.patch ++++++ --- scribus/plugins/psimport/importps.cpp +++ scribus/plugins/psimport/importps.cpp @@ -626,7 +626,7 @@ filename = filename.mid(0, filename.length()-3) + "psd"; } - qDebug(QString("import %6 image %1: %2x%3 @ (%4,%5) °%5").arg(filename).arg(w).arg(h).arg(x).arg(y).arg(angle).arg(device)); + qDebug("%s", QString("import %6 image %1: %2x%3 @ (%4,%5) °%5").arg(filename).arg(w).arg(h).arg(x).arg(y).arg(angle).arg(device)); QString rawfile = filename.mid(0, filename.length()-3) + "dat"; QStringList args; args.append( getShortPathName(PrefsManager::instance()->ghostscriptExecutable()) ); --- scribus/scimage.cpp +++ scribus/scimage.cpp @@ -4416,6 +4416,6 @@ QMessageBox::warning(ScMW, CommonStrings::trWarning, message, 1, 0, 0); } else if (!message.isEmpty()) - qWarning( message.local8Bit().data() ); + qWarning("%s", message.local8Bit().data() ); return true; } ++++++ scribus-1.3.3.7_string-literal-comparsion-b.patch ++++++ --- scribus/plugins/scriptplugin/cmdmisc.cpp +++ scribus/plugins/scriptplugin/cmdmisc.cpp @@ -190,7 +190,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Layer == "") + if (Layer[0] == 0) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; @@ -229,7 +229,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") + if (Name[0] == 0) { PyErr_SetString(PyExc_ValueError, QString("Cannot have an empty layer name")); return NULL; @@ -261,7 +261,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") + if (Name[0] == 0) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; @@ -292,7 +292,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") + if (Name[0] == 0) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; @@ -323,7 +323,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") + if (Name[0] == 0) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; @@ -355,7 +355,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") + if (Name[0] == 0) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot have an empty layer name.","python error")); return NULL; @@ -410,7 +410,7 @@ return NULL; if(!checkHaveDocument()) return NULL; - if (Name == "") + if (Name[0] == 0) { PyErr_SetString(PyExc_ValueError, QObject::tr("Cannot create layer without a name.","python error")); return NULL; --- scribus/plugins/scriptplugin/cmdobj.cpp +++ scribus/plugins/scriptplugin/cmdobj.cpp @@ -30,7 +30,7 @@ ScMW->doc->toolSettings.dWidth, ScMW->doc->toolSettings.dBrush, ScMW->doc->toolSettings.dPen, true); ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") + if (Name[0] != 0) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } @@ -59,7 +59,7 @@ return NULL; } ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") + if (Name[0] != 0) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } @@ -86,7 +86,7 @@ return NULL; } ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") + if (Name[0] != 0) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } @@ -113,7 +113,7 @@ return NULL; } ScMW->doc->setRedrawBounding(ScMW->doc->Items->at(i)); - if (Name != "") + if (Name[0] != 0) ScMW->doc->Items->at(i)->setItemName(QString::fromUtf8(Name)); return PyString_FromString(ScMW->doc->Items->at(i)->itemName().utf8()); } @@ -151,7 +151,7 @@ it->updateClip(); ScMW->doc->setRedrawBounding(it); it->OwnPage = ScMW->doc->OnPage(it); - if (Name != "") + if (Name[0] != 0) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } @@ -224,7 +224,7 @@ } ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); ScMW->view->AdjustItemSize(it); - if (Name != "") + if (Name[0] != 0) { it->setItemName(QString::fromUtf8(Name)); } @@ -304,7 +304,7 @@ } ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); ScMW->view->AdjustItemSize(it); - if (Name != "") + if (Name[0] != 0) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } @@ -391,7 +391,7 @@ } ScMW->view->SizeItem(it->PoLine.WidthHeight().x(), it->PoLine.WidthHeight().y(), ic, false, false, false); ScMW->view->AdjustItemSize(it); - if (Name != "") + if (Name[0] != 0) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } @@ -429,7 +429,7 @@ PageItem *it = ScMW->doc->Items->at(i); ScMW->view->ToPathText(); ScMW->view->MoveItem(pageUnitXToDocX(x) - it->xPos(), pageUnitYToDocY(y) - it->yPos(), it); - if (Name != "") + if (Name[0] != 0) it->setItemName(QString::fromUtf8(Name)); return PyString_FromString(it->itemName().utf8()); } @@ -532,7 +532,7 @@ return NULL; } // for current item only - if (ScMW->doc->m_Selection->count() == 0 || name != "") + if (ScMW->doc->m_Selection->count() == 0 || name[0] != 0) { // quick hack to always apply on the right frame - pv ScMW->view->Deselect(true); ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org