Compare commits

..

13 Commits
master ... f9

Author SHA1 Message Date
Fedora Release Engineering 8ac31914ad dist-git conversion 2010-07-28 19:20:57 +00:00
Bill Nottingham a244889bd2 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:21:23 +00:00
Kevin Kofler 09b773362c Fix typo. 2008-12-15 07:17:12 +00:00
Kevin Kofler 5e1fc02159 Sync from devel:
Mon Dec 15 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.5.10-3
- update the KatePart latex.xml syntax definition to the version from Kile
    2.0.3
Thu Dec 04 2008 Rex Dieter <rdieter@fedoraproject.org> 3.5.10-2
- omit libkscreensaver (F9+)
2008-12-15 06:35:14 +00:00
Kevin Kofler 77a2cf577e Sync from devel:
Tue Aug 26 2008 Rex Dieter <rdieter@fedoraproject.org> 3.5.10-1
- kde-3.5.10
Fri Aug 22 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 3.5.9-18
- fix build against Rawhide kernel headers (fix flock and flock64
    redefinition)
2008-09-02 17:22:37 +00:00
Kevin Kofler f2029eba95 - fix logic error in OnlyShowIn=KDE3 patch 2008-08-22 22:01:30 +00:00
Kevin Kofler e8a0969265 - f9+: use drkonqi from KDE 4 kdebase-runtime in KCrash (#453243) 2008-07-02 06:31:21 +00:00
Kevin Kofler dfc42d09e8 - set include_crystalsvg to 1 everywhere
- use Epoch 1 for crystalsvg-icon-theme, add Obsoletes
2008-06-04 21:45:39 +00:00
Rex Dieter 79f9695775 - revert kdeui symlink hack (there be dragons)
- unbreak -apidocs, add %check so this never ever happens again
2008-06-03 22:28:25 +00:00
Rex Dieter a897be9d0e bootstrap for sparc 2008-05-30 19:41:47 +00:00
Rex Dieter c78fd12ad1 kresources.desktop: use OnlyShowIn=KDE3 2008-05-15 21:06:31 +00:00
Rex Dieter 041ce6693c - (Only|Not)ShowIn=KDE3 patch (helps #446466) 2008-05-15 20:54:16 +00:00
Jesse Keating 2af744fd76 Initialize branch F-9 for kdelibs3 2008-04-21 00:20:30 +00:00
42 changed files with 396 additions and 7608 deletions

View File

@ -12,3 +12,6 @@ if ( -f /etc/sysconfig/prelink ) then
endif
endif
## if not using IPv6, speeds DNS operations
# if ( ! $?KDE_NO_IPV6 ) setenv KDE_NO_IPV6 1

7
kde.sh
View File

@ -5,7 +5,8 @@
[ -z "$KDEDIRS" ] && KDEDIRS="/usr" && export KDEDIRS
## When/if using prelinking, avoids (some) use of kdeinit
if [ -z "$KDE_IS_PRELINKED" ] ; then
grep -qs '^PRELINKING=yes' /etc/sysconfig/prelink && \
KDE_IS_PRELINKED=1 && export KDE_IS_PRELINKED
if [ -f /etc/sysconfig/prelink ]; then
if [ `grep '^PRELINKING=yes' /etc/sysconfig/prelink` ] ; then
[ -z "$KDE_IS_PRELINKED" ] && KDE_IS_PRELINKED=1 && export KDE_IS_PRELINKED
fi
fi

View File

@ -1,66 +0,0 @@
2009-12-10 Stepan Kasal <skasal@redhat.com>
The change of implementation of AC_REQUIRE in 2.64 caused a regression
in the arts project.
This can be fixed by shuffling some macro calls.
I suppose that most of this patch will not be needed with a future
release of Autoconf.
But the last chunk of this patch is a real bug in this source and
should go upstream.
--- arts-1.5.10/admin/acinclude.m4.in 2008-08-20 18:07:05.000000000 +0200
+++ arts-1.5.10/admin/acinclude.m4.in 2009-12-09 17:30:57.000000000 +0100
@@ -3081,8 +3081,18 @@
fi
])
+AC_DEFUN([AC_CHECK_COMPILERS_CC],
+[
+ dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
+ CFLAGS=" $CFLAGS"
+ AC_PROG_CC
+ CXXFLAGS=" $CXXFLAGS"
+ AC_PROG_CXX
+])
+
AC_DEFUN([AC_CHECK_COMPILERS],
[
+ AC_REQUIRE([AC_CHECK_COMPILERS_CC])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug=ARG],[enables debug symbols (yes|no|full) [default=no]]),
[
@@ -3141,11 +3151,6 @@
[kde_use_profiling="no"]
)
- dnl this prevents stupid AC_PROG_CC to add "-g" to the default CFLAGS
- CFLAGS=" $CFLAGS"
-
- AC_PROG_CC
-
AC_PROG_CPP
if test "$GCC" = "yes"; then
@@ -3174,10 +3179,6 @@
LDFLAGS=""
fi
- CXXFLAGS=" $CXXFLAGS"
-
- AC_PROG_CXX
-
KDE_CHECK_FOR_BAD_COMPILER
if test "$GXX" = "yes" || test "$CXX" = "KCC"; then
@@ -3503,8 +3504,8 @@
AC_REQUIRE([AC_LIBTOOL_DLOPEN])
AC_REQUIRE([KDE_CHECK_LIB64])
-AC_OBJEXT
-AC_EXEEXT
+AC_REQUIRE([AC_OBJEXT])
+AC_REQUIRE([AC_EXEEXT])
AM_PROG_LIBTOOL
AC_LIBTOOL_CXX

View File

@ -1,12 +0,0 @@
diff -up kdelibs-3.5.10/admin/cvs.sh.me kdelibs-3.5.10/admin/cvs.sh
--- kdelibs-3.5.10/admin/cvs.sh.me 2013-03-07 18:31:59.415038395 +0100
+++ kdelibs-3.5.10/admin/cvs.sh 2013-03-07 18:32:26.565020369 +0100
@@ -130,7 +130,7 @@ if egrep "^AM_CONFIG_HEADER" configure.i
fi
echo "*** Creating Makefile templates"
-$AUTOMAKE || exit 1
+$AUTOMAKE --add-missing --copy --force-missing || exit 1
if test "$UNSERMAKE" = no; then
echo "*** Postprocessing Makefile templates"

View File

@ -1,17 +0,0 @@
diff -ur kdelibs-3.5.10/admin/cvs.sh kdelibs-3.5.10-automake-version/admin/cvs.sh
--- kdelibs-3.5.10/admin/cvs.sh 2008-08-19 22:28:39.000000000 +0200
+++ kdelibs-3.5.10-automake-version/admin/cvs.sh 2012-06-12 01:24:13.000000000 +0200
@@ -63,12 +63,7 @@
AUTOMAKE_STRING=`$AUTOMAKE --version | head -n 1`
required_automake_version="1.6.1 or newer"
case $AUTOMAKE_STRING in
- automake*1.5d* | automake*1.5* | automake*1.5-* )
- echo "*** YOU'RE USING $AUTOMAKE_STRING."
- echo "*** KDE requires automake $required_automake_version"
- exit 1
- ;;
- automake*1.6.* | automake*1.7* | automake*1.8* | automake*1.9* | automake*1.10*)
+ automake*)
echo "*** $AUTOMAKE_STRING found."
UNSERMAKE=no
;;

View File

@ -1,93 +0,0 @@
diff -up kdelibs-3.5.10/configure.in.than kdelibs-3.5.10/configure.in
--- kdelibs-3.5.10/configure.in.than 2017-06-20 18:02:22.845910412 +0200
+++ kdelibs-3.5.10/configure.in 2017-06-20 18:03:09.058172814 +0200
@@ -692,10 +692,10 @@ AC_ARG_WITH(libidn,
[], with_libidn=check)
LIB_IDN=
if test "x$with_libidn" != xno; then
- AC_CHECK_HEADERS([idna.h punycode.h stringprep.h])
- KDE_CHECK_LIB(idn, idna_to_ascii_4i, [
+ AC_CHECK_HEADERS([idn2.h])
+ KDE_CHECK_LIB(idn2, idn2_to_ascii_4i, [
AC_DEFINE_UNQUOTED(HAVE_LIBIDN, 1, [Defined if you have libidn in your system])
- LIB_IDN=-lidn
+ LIB_IDN=-lidn2
])
if test "x$with_libidn" != xcheck && test -z "$LIB_IDN"; then
AC_MSG_ERROR([--with-libidn was given, but test for libidn failed])
diff -up kdelibs-3.5.10/kdecore/configure.in.in.than kdelibs-3.5.10/kdecore/configure.in.in
--- kdelibs-3.5.10/kdecore/configure.in.in.than 2017-06-20 17:53:41.544511539 +0200
+++ kdelibs-3.5.10/kdecore/configure.in.in 2017-06-20 18:01:27.557989259 +0200
@@ -48,10 +48,10 @@ AC_ARG_WITH(libidn,
[], with_libidn=check)
LIB_IDN=
if test "x$with_libidn" != xno; then
- AC_CHECK_HEADERS([idna.h punycode.h stringprep.h])
- KDE_CHECK_LIB(idn, idna_to_ascii_4i, [
+ AC_CHECK_HEADERS([idn2.h])
+ KDE_CHECK_LIB(idn2, idn2_to_ascii_4i, [
AC_DEFINE_UNQUOTED(HAVE_LIBIDN, 1, [Defined if you have libidn in your system])
- LIB_IDN=-lidn
+ LIB_IDN=-lidn2
])
if test "x$with_libidn" != xcheck && test -z "$LIB_IDN"; then
AC_MSG_ERROR([--with-libidn was given, but test for libidn failed])
diff -up kdelibs-3.5.10/kdecore/network/kresolver.cpp.than kdelibs-3.5.10/kdecore/network/kresolver.cpp
--- kdelibs-3.5.10/kdecore/network/kresolver.cpp.than 2017-06-21 12:55:55.733217103 +0200
+++ kdelibs-3.5.10/kdecore/network/kresolver.cpp 2017-06-21 13:27:38.956737181 +0200
@@ -49,8 +49,8 @@
#include <qguardedptr.h>
// IDN
-#ifdef HAVE_IDNA_H
-# include <idna.h>
+#ifdef HAVE_IDN2_H
+# include <idn2.h>
#endif
// KDE
@@ -1083,7 +1083,7 @@ static QStringList splitLabels(const QSt
static QCString ToASCII(const QString& label)
{
-#ifdef HAVE_IDNA_H
+#ifdef HAVE_IDN2_H
// We have idna.h, so we can use the idna_to_ascii
// function :)
@@ -1104,7 +1104,7 @@ static QCString ToASCII(const QString& l
ucs4[i] = (unsigned long)label[i].unicode();
ucs4[i] = 0; // terminate with NUL, just to be on the safe side
- if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS)
+ if (idn2_to_ascii_4i(ucs4, label.length(), buf, 0|IDN2_NFC_INPUT|IDN2_NONTRANSITIONAL) == IDN2_OK)
// success!
retval = buf;
@@ -1117,7 +1117,7 @@ static QCString ToASCII(const QString& l
static QString ToUnicode(const QString& label)
{
-#ifdef HAVE_IDNA_H
+#ifdef HAVE_IDN2_H
// We have idna.h, so we can use the idna_to_unicode
// function :)
@@ -1131,7 +1131,7 @@ static QString ToUnicode(const QString&
// try the same length for output
ucs4_output = new Q_UINT32[outlen = label.length()];
- idna_to_unicode_44i(ucs4_input, label.length(),
+ idn2_to_unicode_44i(ucs4_input, label.length(),
ucs4_output, &outlen,
0);
@@ -1141,7 +1141,7 @@ static QString ToUnicode(const QString&
delete [] ucs4_output;
ucs4_output = new Q_UINT32[outlen];
- idna_to_unicode_44i(ucs4_input, label.length(),
+ idn2_to_unicode_44i(ucs4_input, label.length(),
ucs4_output, &outlen,
0);
}

View File

@ -1,62 +0,0 @@
diff -pruN kdelibs-3.5.4.orig/kio/kssl/kopenssl.cc kdelibs-3.5.4/kio/kssl/kopenssl.cc
--- kdelibs-3.5.4.orig/kio/kssl/kopenssl.cc 2009-08-31 20:50:12.000000000 +0200
+++ kdelibs-3.5.4/kio/kssl/kopenssl.cc 2009-08-31 21:46:47.000000000 +0200
@@ -196,6 +196,7 @@ static int (*K_X509_NAME_add_entry_by_tx
static X509_NAME *(*K_X509_NAME_new)() = 0L;
static int (*K_X509_REQ_set_subject_name)(X509_REQ*,X509_NAME*) = 0L;
static unsigned char *(*K_ASN1_STRING_data)(ASN1_STRING*) = 0L;
+static int (*K_ASN1_STRING_length)(ASN1_STRING*) = 0L;
static STACK_OF(SSL_CIPHER) *(*K_SSL_get_ciphers)(const SSL *ssl) = 0L;
#endif
@@ -498,6 +499,7 @@ KConfig *cfg;
K_X509_NAME_new = (X509_NAME *(*)()) _cryptoLib->symbol("X509_NAME_new");
K_X509_REQ_set_subject_name = (int (*)(X509_REQ*,X509_NAME*)) _cryptoLib->symbol("X509_REQ_set_subject_name");
K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING*)) _cryptoLib->symbol("ASN1_STRING_data");
+ K_ASN1_STRING_length = (int (*)(ASN1_STRING*)) _cryptoLib->symbol("ASN1_STRING_length");
#endif
}
@@ -1549,6 +1551,13 @@ unsigned char *KOpenSSLProxy::ASN1_STRIN
return 0L;
}
+
+int KOpenSSLProxy::ASN1_STRING_length(ASN1_STRING *x) {
+ if (K_ASN1_STRING_length) return (K_ASN1_STRING_length)(x);
+ return 0L;
+}
+
+
STACK_OF(SSL_CIPHER) *KOpenSSLProxy::SSL_get_ciphers(const SSL* ssl) {
if (K_SSL_get_ciphers) return (K_SSL_get_ciphers)(ssl);
return 0L;
diff -pruN kdelibs-3.5.4.orig/kio/kssl/kopenssl.h kdelibs-3.5.4/kio/kssl/kopenssl.h
--- kdelibs-3.5.4.orig/kio/kssl/kopenssl.h 2006-07-22 10:16:39.000000000 +0200
+++ kdelibs-3.5.4/kio/kssl/kopenssl.h 2009-08-31 21:46:47.000000000 +0200
@@ -622,6 +622,11 @@ public:
unsigned char *ASN1_STRING_data(ASN1_STRING *x);
/*
+ * ASN1_STRING_length
+ */
+ int ASN1_STRING_length(ASN1_STRING *x);
+
+ /*
*
*/
int OBJ_obj2nid(ASN1_OBJECT *o);
diff -pruN kdelibs-3.5.4.orig/kio/kssl/ksslcertificate.cc kdelibs-3.5.4/kio/kssl/ksslcertificate.cc
--- kdelibs-3.5.4.orig/kio/kssl/ksslcertificate.cc 2006-01-19 18:06:12.000000000 +0100
+++ kdelibs-3.5.4/kio/kssl/ksslcertificate.cc 2009-08-31 21:54:38.000000000 +0200
@@ -1099,7 +1099,9 @@ QStringList KSSLCertificate::subjAltName
}
QString s = (const char *)d->kossl->ASN1_STRING_data(val->d.ia5);
- if (!s.isEmpty()) {
+ if (!s.isEmpty() &&
+ /* skip subjectAltNames with embedded NULs */
+ s.length() == d->kossl->ASN1_STRING_length(val->d.ia5)) {
rc += s;
}
}

View File

@ -1,166 +0,0 @@
diff -ur kdelibs-3.5.10/kioslave/http/http.cc kdelibs-3.5.10-CVE-2013-2074/kioslave/http/http.cc
--- kdelibs-3.5.10/kioslave/http/http.cc 2008-02-13 10:41:06.000000000 +0100
+++ kdelibs-3.5.10-CVE-2013-2074/kioslave/http/http.cc 2013-05-14 17:54:42.000000000 +0200
@@ -288,7 +288,7 @@
m_bUseProxy = m_proxyURL.isValid();
kdDebug(7113) << "(" << m_pid << ") Using proxy: " << m_bUseProxy <<
- " URL: " << m_proxyURL.url() <<
+ " URL: " << m_proxyURL.prettyURL() <<
" Realm: " << m_strProxyRealm << endl;
}
@@ -458,7 +458,7 @@
bool HTTPProtocol::checkRequestURL( const KURL& u )
{
- kdDebug (7113) << "(" << m_pid << ") HTTPProtocol::checkRequestURL: " << u.url() << endl;
+ kdDebug (7113) << "(" << m_pid << ") HTTPProtocol::checkRequestURL: " << u.prettyURL() << endl;
m_request.url = u;
@@ -640,7 +640,7 @@
void HTTPProtocol::listDir( const KURL& url )
{
- kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::listDir " << url.url()
+ kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::listDir " << url.prettyURL()
<< endl;
if ( !checkRequestURL( url ) )
@@ -807,7 +807,7 @@
void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method )
{
- kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davGeneric " << url.url()
+ kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davGeneric " << url.prettyURL()
<< endl;
if ( !checkRequestURL( url ) )
@@ -1206,7 +1206,7 @@
void HTTPProtocol::mkdir( const KURL& url, int )
{
- kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::mkdir " << url.url()
+ kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::mkdir " << url.prettyURL()
<< endl;
if ( !checkRequestURL( url ) )
@@ -1228,7 +1228,7 @@
void HTTPProtocol::get( const KURL& url )
{
- kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::get " << url.url()
+ kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::get " << url.prettyURL()
<< endl;
if ( !checkRequestURL( url ) )
@@ -1543,8 +1543,10 @@
callError = true;
}
+ // Huh? This looks like inverted logic to me (it doesn't make sense to me as
+ // written), but I'm only fixing the CVE now. -- Kevin Kofler
if ( !url.isNull() )
- url = m_request.url.url();
+ url = m_request.url.prettyURL();
QString action, errorString;
KIO::Error kError;
@@ -1840,7 +1842,7 @@
if ( !checkRequestURL( url ) )
continue;
- kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::multi_get " << url.url() << endl;
+ kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::multi_get " << url.prettyURL() << endl;
m_request.method = HTTP_GET;
m_request.path = url.path();
@@ -2212,12 +2214,12 @@
if (bCacheOnly)
{
- error( ERR_DOES_NOT_EXIST, m_request.url.url() );
+ error( ERR_DOES_NOT_EXIST, m_request.url.prettyURL() );
return false;
}
if (bOffline)
{
- error( ERR_COULD_NOT_CONNECT, m_request.url.url() );
+ error( ERR_COULD_NOT_CONNECT, m_request.url.prettyURL() );
return false;
}
}
@@ -2891,7 +2893,7 @@
errorPage();
else
{
- error(ERR_INTERNAL_SERVER, m_request.url.url());
+ error(ERR_INTERNAL_SERVER, m_request.url.prettyURL());
return false;
}
}
@@ -2931,7 +2933,7 @@
errorPage();
else
{
- error(ERR_DOES_NOT_EXIST, m_request.url.url());
+ error(ERR_DOES_NOT_EXIST, m_request.url.prettyURL());
return false;
}
m_request.bCachedWrite = false; // Don't put in cache
@@ -3584,7 +3586,7 @@
KURL u(m_request.url, locationStr);
if(!u.isValid())
{
- error(ERR_MALFORMED_URL, u.url());
+ error(ERR_MALFORMED_URL, u.prettyURL());
return false;
}
if ((u.protocol() != "http") && (u.protocol() != "https") &&
@@ -3592,7 +3594,7 @@
(u.protocol() != "webdavs"))
{
redirection(u);
- error(ERR_ACCESS_DENIED, u.url());
+ error(ERR_ACCESS_DENIED, u.prettyURL());
return false;
}
@@ -3613,10 +3615,10 @@
sendMetaData();
}
- kdDebug(7113) << "(" << m_pid << ") request.url: " << m_request.url.url()
+ kdDebug(7113) << "(" << m_pid << ") request.url: " << m_request.url.prettyURL()
<< endl << "LocationStr: " << locationStr.data() << endl;
- kdDebug(7113) << "(" << m_pid << ") Requesting redirection to: " << u.url()
+ kdDebug(7113) << "(" << m_pid << ") Requesting redirection to: " << u.prettyURL()
<< endl;
// If we're redirected to a http:// url, remember that we're doing webdav...
@@ -3832,7 +3834,7 @@
if (!m_request.fcache)
{
m_request.bCachedWrite = false; // Error creating cache entry.
- kdDebug(7113) << "(" << m_pid << ") Error creating cache entry for " << m_request.url.url()<<"!\n";
+ kdDebug(7113) << "(" << m_pid << ") Error creating cache entry for " << m_request.url.prettyURL()<<"!\n";
}
m_request.expireDate = expireDate;
m_maxCacheSize = config()->readNumEntry("MaxCacheSize", DEFAULT_MAX_CACHE_SIZE) / 2;
@@ -3840,11 +3842,11 @@
}
if (m_request.bCachedWrite && !m_strMimeType.isEmpty())
- kdDebug(7113) << "(" << m_pid << ") Cache, adding \"" << m_request.url.url() << "\"" << endl;
+ kdDebug(7113) << "(" << m_pid << ") Cache, adding \"" << m_request.url.prettyURL() << "\"" << endl;
else if (m_request.bCachedWrite && m_strMimeType.isEmpty())
- kdDebug(7113) << "(" << m_pid << ") Cache, pending \"" << m_request.url.url() << "\"" << endl;
+ kdDebug(7113) << "(" << m_pid << ") Cache, pending \"" << m_request.url.prettyURL() << "\"" << endl;
else
- kdDebug(7113) << "(" << m_pid << ") Cache, not adding \"" << m_request.url.url() << "\"" << endl;
+ kdDebug(7113) << "(" << m_pid << ") Cache, not adding \"" << m_request.url.prettyURL() << "\"" << endl;
return true;
}

View File

@ -1,38 +0,0 @@
diff -ur kdelibs-3.5.10/kinit/lnusertemp.c kdelibs-3.5.10-CVE-2015-7543/kinit/lnusertemp.c
--- kdelibs-3.5.10/kinit/lnusertemp.c 2007-05-14 09:52:34.000000000 +0200
+++ kdelibs-3.5.10-CVE-2015-7543/kinit/lnusertemp.c 2015-12-10 10:04:02.934321515 +0100
@@ -178,7 +178,11 @@
if (result == 0) return 0; /* Success */
unlink(kde_tmp_dir);
strncat(user_tmp_dir, "XXXXXX", PATH_MAX - strlen(user_tmp_dir));
+#if 0
mktemp(user_tmp_dir); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
+#else
+ if (mkdtemp(user_tmp_dir)==0) return 1; /*JOWENN: isn't that the better solution ?? */
+#endif
return create_link(kde_tmp_dir, user_tmp_dir);
}
if ((result == -1) || (!S_ISLNK(stat_buf.st_mode)))
@@ -204,14 +208,22 @@
if (result == 0) return 0; /* Success */
unlink(kde_tmp_dir);
strncat(user_tmp_dir, "XXXXXX", PATH_MAX - strlen(user_tmp_dir));
+#if 0
mktemp(user_tmp_dir); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
+#else
+ if (mkdtemp(user_tmp_dir)==0) return 1; /*JOWENN: isn't that the better solution ?? */
+#endif
return create_link(kde_tmp_dir, user_tmp_dir);
}
result = check_tmp_dir(tmp_buf);
if (result == 0) return 0; /* Success */
unlink(kde_tmp_dir);
strncat(user_tmp_dir, "XXXXXX", PATH_MAX - strlen(user_tmp_dir));
+#if 0
mktemp(user_tmp_dir); /* We want a directory, not a file, so using mkstemp makes no sense and is wrong */
+#else
+ if (mkdtemp(user_tmp_dir)==0) return 1; /*JOWENN: isn't that the better solution ?? */
+#endif
return create_link(kde_tmp_dir, user_tmp_dir);
}

View File

@ -1,48 +0,0 @@
From 261a3b7a126b7a1d28e263085b85bf1905eb4c19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= <slavek.banko@axis.cz>
Date: Sun, 23 Oct 2016 10:48:01 +0200
Subject: Fix security issue CVE-2016-6232 Based on
https://quickgit.kde.org/?p=karchive.git&a=commitdiff&h=0cb243f6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp
index b0e0dc6..69e54d1 100644
--- a/kio/kio/karchive.cpp
+++ b/kio/kio/karchive.cpp
@@ -601,6 +601,7 @@ void KArchiveDirectory::addEntry( KArchiveEntry* entry )
void KArchiveDirectory::copyTo(const QString& dest, bool recursiveCopy ) const
{
QDir root;
+ const QString destDir(QDir(dest).absPath()); // get directory path without any "." or ".."
PosSortedPtrList fileList;
QMap<int, QString> fileToDir;
@@ -620,10 +621,19 @@ void KArchiveDirectory::copyTo(const QString& dest, bool recursiveCopy ) const
QValueStack<QString> dirNameStack;
dirStack.push( this ); // init stack at current directory
- dirNameStack.push( dest ); // ... with given path
+ dirNameStack.push( destDir ); // ... with given path
do {
curDir = dirStack.pop();
- curDirName = dirNameStack.pop();
+
+ // extract only to specified folder if it is located within archive's extraction folder
+ // otherwise put file under root position in extraction folder
+ QString curDirName = dirNameStack.pop();
+ if (!QDir(curDirName).absPath().startsWith(destDir)) {
+ kdWarning() << "Attempted export into folder" << curDirName
+ << "which is outside of the extraction root folder" << destDir << "."
+ << "Changing export of contained files to extraction root folder.";
+ curDirName = destDir;
+ }
root.mkdir(curDirName);
dirEntries = curDir->entries();
--
cgit v0.10.2

View File

@ -1,24 +0,0 @@
diff -ur kdelibs-3.5.10/kio/misc/kpac/script.cpp kdelibs-3.5.10-CVE-2017-6410/kio/misc/kpac/script.cpp
--- kdelibs-3.5.10/kio/misc/kpac/script.cpp 2008-02-13 10:41:06.000000000 +0100
+++ kdelibs-3.5.10-CVE-2017-6410/kio/misc/kpac/script.cpp 2017-03-04 18:42:29.638992390 +0100
@@ -446,10 +446,18 @@
if (!findObj.isValid() || !findObj.implementsCall())
throw Error( "No such function FindProxyForURL" );
+ KURL cleanUrl = url;
+ cleanUrl.setPass(QString());
+ cleanUrl.setUser(QString());
+ if (cleanUrl.protocol().lower() == "https") {
+ cleanUrl.setPath(QString());
+ cleanUrl.setQuery(QString());
+ }
+
Object thisObj;
List args;
- args.append(String(url.url()));
- args.append(String(url.host()));
+ args.append(String(cleanUrl.url()));
+ args.append(String(cleanUrl.host()));
Value retval = findObj.call( exec, thisObj, args );
if ( exec->hadException() ) {

View File

@ -1,13 +0,0 @@
--- kdelibs-3.5.10/kio/kio/karchive.cpp.orig 2009-12-09 18:40:26.000000000 +0100
+++ kdelibs-3.5.10/kio/kio/karchive.cpp 2009-12-09 18:41:14.000000000 +0100
@@ -588,7 +588,9 @@
void KArchiveDirectory::addEntry( KArchiveEntry* entry )
{
- Q_ASSERT( !entry->name().isEmpty() );
+ if( entry->name().isEmpty() )
+ return;
+
if( m_entries[ entry->name() ] ) {
kdWarning() << "KArchiveDirectory::addEntry: directory " << name()
<< " has entry " << entry->name() << " already" << endl;

View File

@ -1,11 +0,0 @@
diff -ur kdelibs-3.5.10/kdeprint/cups/cupsdconf2/cups-util.c kdelibs-3.5.10-cups-util-missing-header/kdeprint/cups/cupsdconf2/cups-util.c
--- kdelibs-3.5.10/kdeprint/cups/cupsdconf2/cups-util.c 2007-10-08 11:52:10.000000000 +0200
+++ kdelibs-3.5.10-cups-util-missing-header/kdeprint/cups/cupsdconf2/cups-util.c 2011-06-17 18:18:56.000000000 +0200
@@ -2,6 +2,7 @@
#include <cups/http.h>
#include <cups/cups.h>
#include <stdlib.h>
+#include <stdio.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>

View File

@ -1,849 +0,0 @@
diff -ur kdelibs-3.5.10/kdeprint/configure.in.in kdelibs-3.5.10-cups16/kdeprint/configure.in.in
--- kdelibs-3.5.10/kdeprint/configure.in.in 2005-09-10 10:27:43.000000000 +0200
+++ kdelibs-3.5.10-cups16/kdeprint/configure.in.in 2012-12-25 16:29:53.000000000 +0100
@@ -84,6 +84,13 @@
if test "$ac_have_new_cups" = "yes"; then
AC_DEFINE(HAVE_CUPS_NO_PWD_CACHE, 1, CUPS doesn't have password caching)
fi
+
+ dnl check if CUPS is at least 1.6
+ ac_have_new_cups="no"
+ AC_CHECK_CUPS_VERSION(1.06)
+ if test "$ac_have_new_cups" = "yes"; then
+ AC_DEFINE(HAVE_CUPS_1_6, 1, CUPS is at least version 1.6)
+ fi
fi
fi
LDFLAGS="$ac_LDFLAGS_save"
diff -ur kdelibs-3.5.10/kdeprint/cups/cupsdconf2/cupsdconf.cpp kdelibs-3.5.10-cups16/kdeprint/cups/cupsdconf2/cupsdconf.cpp
--- kdelibs-3.5.10/kdeprint/cups/cupsdconf2/cupsdconf.cpp 2005-10-10 17:06:30.000000000 +0200
+++ kdelibs-3.5.10-cups16/kdeprint/cups/cupsdconf2/cupsdconf.cpp 2012-12-25 16:34:57.000000000 +0100
@@ -629,26 +629,44 @@
cups_lang_t* lang = cupsLangDefault();
ippAddString(request_, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(lang));
ippAddString(request_, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, lang->language);
+#ifdef HAVE_CUPS_1_6
+ ippSetOperation(request_, CUPS_GET_PRINTERS);
+#else // HAVE_CUPS_1_6
request_->request.op.operation_id = CUPS_GET_PRINTERS;
+#endif // HAVE_CUPS_1_6
request_ = cupsDoRequest(http_, request_, "/printers/");
if (request_)
{
QString name;
int type(0);
+#ifdef HAVE_CUPS_1_6
+ ipp_attribute_t *attr = ippFirstAttribute(request_);
+#else // HAVE_CUPS_1_6
ipp_attribute_t *attr = request_->attrs;
+#endif // HAVE_CUPS_1_6
while (attr)
{
// check new printer (keep only local non-implicit printers)
+#ifdef HAVE_CUPS_1_6
+ if (!ippGetName(attr))
+#else // HAVE_CUPS_1_6
if (!attr->name)
+#endif // HAVE_CUPS_1_6
{
if (!(type & CUPS_PRINTER_REMOTE) && !(type & CUPS_PRINTER_IMPLICIT) && !name.isEmpty())
resources_.append(new CupsResource("/printers/"+name));
name = "";
type = 0;
}
+#ifdef HAVE_CUPS_1_6
+ else if (strcmp(ippGetName(attr), "printer-name") == 0) name = ippGetString(attr, 0, NULL);
+ else if (strcmp(ippGetName(attr), "printer-type") == 0) type = ippGetInteger(attr, 0);
+ attr = ippNextAttribute(request_);
+#else // HAVE_CUPS_1_6
else if (strcmp(attr->name, "printer-name") == 0) name = attr->values[0].string.text;
else if (strcmp(attr->name, "printer-type") == 0) type = attr->values[0].integer;
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
if (!(type & CUPS_PRINTER_REMOTE) && !(type & CUPS_PRINTER_IMPLICIT) && !name.isEmpty())
resources_.append(new CupsResource("/printers/"+name));
@@ -658,26 +676,44 @@
request_ = ippNew();
ippAddString(request_, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, cupsLangEncoding(lang));
ippAddString(request_, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, lang->language);
+#ifdef HAVE_CUPS_1_6
+ ippSetOperation(request_, CUPS_GET_CLASSES);
+#else // HAVE_CUPS_1_6
request_->request.op.operation_id = CUPS_GET_CLASSES;
+#endif // HAVE_CUPS_1_6
request_ = cupsDoRequest(http_, request_, "/classes/");
if (request_)
{
QString name;
int type(0);
+#ifdef HAVE_CUPS_1_6
+ ipp_attribute_t *attr = ippFirstAttribute(request_);
+#else // HAVE_CUPS_1_6
ipp_attribute_t *attr = request_->attrs;
+#endif // HAVE_CUPS_1_6
while (attr)
{
// check new class (keep only local classes)
+#ifdef HAVE_CUPS_1_6
+ if (!ippGetName(attr))
+#else // HAVE_CUPS_1_6
if (!attr->name)
+#endif // HAVE_CUPS_1_6
{
if (!(type & CUPS_PRINTER_REMOTE) && !name.isEmpty())
resources_.append(new CupsResource("/classes/"+name));
name = "";
type = 0;
}
+#ifdef HAVE_CUPS_1_6
+ else if (strcmp(ippGetName(attr), "printer-name") == 0) name = ippGetString(attr, 0, NULL);
+ else if (strcmp(ippGetName(attr), "printer-type") == 0) type = ippGetInteger(attr, 0);
+ attr = ippNextAttribute(request_);
+#else // HAVE_CUPS_1_6
else if (strcmp(attr->name, "printer-name") == 0) name = attr->values[0].string.text;
else if (strcmp(attr->name, "printer-type") == 0) type = attr->values[0].integer;
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
if (!(type & CUPS_PRINTER_REMOTE) && !name.isEmpty())
resources_.append(new CupsResource("/classes/"+name));
diff -ur kdelibs-3.5.10/kdeprint/cups/ipprequest.cpp kdelibs-3.5.10-cups16/kdeprint/cups/ipprequest.cpp
--- kdelibs-3.5.10/kdeprint/cups/ipprequest.cpp 2007-10-08 11:52:10.000000000 +0200
+++ kdelibs-3.5.10-cups16/kdeprint/cups/ipprequest.cpp 2012-12-25 16:55:53.000000000 +0100
@@ -51,6 +51,58 @@
kdDebug(500) << "Null request" << endl;
return;
}
+#ifdef HAVE_CUPS_1_6
+ kdDebug(500) << "State = 0x" << QString::number(ippGetState(req), 16) << endl;
+ kdDebug(500) << "ID = 0x" << QString::number(ippGetRequestId(req), 16) << endl;
+ if (answer)
+ {
+ kdDebug(500) << "Status = 0x" << QString::number(ippGetStatusCode(req), 16) << endl;
+ kdDebug(500) << "Status message = " << ippErrorString(ippGetStatusCode(req)) << endl;
+ }
+ else
+ kdDebug(500) << "Operation = 0x" << QString::number(ippGetOperation(req), 16) << endl;
+ int minorVersion;
+ int majorVersion = ippGetVersion(req, &minorVersion);
+ kdDebug(500) << "Version = " << (int)(majorVersion) << "." << (int)(minorVersion) << endl;
+ kdDebug(500) << endl;
+
+ ipp_attribute_t *attr = ippFirstAttribute(req);
+ while (attr)
+ {
+ QString s = QString::fromLatin1("%1 (0x%2) = ").arg(ippGetName(attr)).arg(ippGetValueTag(attr), 0, 16);
+ for (int i=0;i<ippGetCount(attr);i++)
+ {
+ switch (ippGetValueTag(attr))
+ {
+ case IPP_TAG_INTEGER:
+ case IPP_TAG_ENUM:
+ s += ("0x"+QString::number(ippGetInteger(attr, i), 16));
+ break;
+ case IPP_TAG_BOOLEAN:
+ s += (ippGetBoolean(attr, i) ? "true" : "false");
+ break;
+ case IPP_TAG_STRING:
+ case IPP_TAG_TEXT:
+ case IPP_TAG_NAME:
+ case IPP_TAG_KEYWORD:
+ case IPP_TAG_URI:
+ case IPP_TAG_MIMETYPE:
+ case IPP_TAG_NAMELANG:
+ case IPP_TAG_TEXTLANG:
+ case IPP_TAG_CHARSET:
+ case IPP_TAG_LANGUAGE:
+ s += ippGetString(attr, i, NULL);
+ break;
+ default:
+ break;
+ }
+ if (i != (ippGetCount(attr)-1))
+ s += ", ";
+ }
+ kdDebug(500) << s << endl;
+ attr = ippNextAttribute(req);
+ }
+#else // HAVE_CUPS_1_6
kdDebug(500) << "State = 0x" << QString::number(req->state, 16) << endl;
kdDebug(500) << "ID = 0x" << QString::number(req->request.status.request_id, 16) << endl;
if (answer)
@@ -99,6 +151,7 @@
kdDebug(500) << s << endl;
attr = attr->next;
}
+#endif // HAVE_CUPS_1_6
}
QString errorString(int status)
@@ -177,7 +230,11 @@
ipp_attribute_t *attr = ippAddStrings(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),(int)(values.count()),NULL,NULL);
int i(0);
for (QStringList::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+#ifdef HAVE_CUPS_1_6
+ ippSetString(request_, &attr, i, strdup((*it).local8Bit()));
+#else // HAVE_CUPS_1_6
attr->values[i].string.text = strdup((*it).local8Bit());
+#endif // HAVE_CUPS_1_6
}
}
@@ -193,7 +250,11 @@
ipp_attribute_t *attr = ippAddIntegers(request_,(ipp_tag_t)group,(ipp_tag_t)type,name.latin1(),(int)(values.count()),NULL);
int i(0);
for (QValueList<int>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+#ifdef HAVE_CUPS_1_6
+ ippSetInteger(request_, &attr, i, *it);
+#else // HAVE_CUPS_1_6
attr->values[i].integer = *it;
+#endif // HAVE_CUPS_1_6
}
}
@@ -209,19 +270,32 @@
ipp_attribute_t *attr = ippAddBooleans(request_,(ipp_tag_t)group,name.latin1(),(int)(values.count()),NULL);
int i(0);
for (QValueList<bool>::ConstIterator it=values.begin(); it != values.end(); ++it, i++)
+#ifdef HAVE_CUPS_1_6
+ ippSetBoolean(request_, &attr, i, (char)(*it));
+#else // HAVE_CUPS_1_6
attr->values[i].boolean = (char)(*it);
+#endif // HAVE_CUPS_1_6
}
}
void IppRequest::setOperation(int op)
{
+#ifdef HAVE_CUPS_1_6
+ ippSetOperation(request_, (ipp_op_t)op);
+ ippSetRequestId(request_, 1); // 0 is not RFC-compliant, should be at least 1
+#else // HAVE_CUPS_1_6
request_->request.op.operation_id = (ipp_op_t)op;
request_->request.op.request_id = 1; // 0 is not RFC-compliant, should be at least 1
+#endif // HAVE_CUPS_1_6
}
int IppRequest::status()
{
+#ifdef HAVE_CUPS_1_6
+ return (request_ ? ippGetStatusCode(request_) : (connect_ ? cupsLastError() : -2));
+#else // HAVE_CUPS_1_6
return (request_ ? request_->request.status.status_code : (connect_ ? cupsLastError() : -2));
+#endif // HAVE_CUPS_1_6
}
QString IppRequest::statusMessage()
@@ -248,7 +322,11 @@
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
if (attr)
{
+#ifdef HAVE_CUPS_1_6
+ value = ippGetInteger(attr, 0);
+#else // HAVE_CUPS_1_6
value = attr->values[0].integer;
+#endif // HAVE_CUPS_1_6
return true;
}
else return false;
@@ -260,7 +338,11 @@
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), (ipp_tag_t)type);
if (attr)
{
+#ifdef HAVE_CUPS_1_6
+ value = QString::fromLocal8Bit(ippGetString(attr, 0, NULL));
+#else // HAVE_CUPS_1_6
value = QString::fromLocal8Bit(attr->values[0].string.text);
+#endif // HAVE_CUPS_1_6
return true;
}
else return false;
@@ -273,8 +355,13 @@
values.clear();
if (attr)
{
+#ifdef HAVE_CUPS_1_6
+ for (int i=0;i<ippGetCount(attr);i++)
+ values.append(QString::fromLocal8Bit(ippGetString(attr, i, NULL)));
+#else // HAVE_CUPS_1_6
for (int i=0;i<attr->num_values;i++)
values.append(QString::fromLocal8Bit(attr->values[i].string.text));
+#endif // HAVE_CUPS_1_6
return true;
}
else return false;
@@ -286,7 +373,11 @@
ipp_attribute_t *attr = ippFindAttribute(request_, name.latin1(), IPP_TAG_BOOLEAN);
if (attr)
{
+#ifdef HAVE_CUPS_1_6
+ value = (bool)ippGetBoolean(attr, 0);
+#else // HAVE_CUPS_1_6
value = (bool)attr->values[0].boolean;
+#endif // HAVE_CUPS_1_6
return true;
}
else return false;
@@ -338,10 +429,18 @@
}
/* No printers found */
+#ifdef HAVE_CUPS_1_6
+ if ( request_ && ippGetStatusCode(request_) == 0x406 )
+#else // HAVE_CUPS_1_6
if ( request_ && request_->request.status.status_code == 0x406 )
+#endif // HAVE_CUPS_1_6
return true;
+#ifdef HAVE_CUPS_1_6
+ if (!request_ || ippGetState(request_) == IPP_ERROR || (ippGetStatusCode(request_) & 0x0F00))
+#else // HAVE_CUPS_1_6
if (!request_ || request_->state == IPP_ERROR || (request_->request.status.status_code & 0x0F00))
+#endif // HAVE_CUPS_1_6
return false;
@@ -356,14 +455,88 @@
output << "<tr><th bgcolor=\"dark blue\"><font color=\"white\">" << i18n("Attribute") << "</font></th>" << endl;
output << "<th bgcolor=\"dark blue\"><font color=\"white\">" << i18n("Values") << "</font></th></tr>" << endl;
// go to the first attribute of the specified group
+#ifdef HAVE_CUPS_1_6
+ ipp_attribute_t *attr = ippFirstAttribute(request_);
+ while (attr && ippGetGroupTag(attr) != group)
+ attr = ippNextAttribute(request_);
+#else // HAVE_CUPS_1_6
ipp_attribute_t *attr = request_->attrs;
while (attr && attr->group_tag != group)
attr = attr->next;
+#endif // HAVE_CUPS_1_6
// print each attribute
- ipp_uchar_t *d;
- QCString dateStr;
- QDateTime dt;
- bool bg(false);
+ const ipp_uchar_t *d;
+ QCString dateStr;
+ QDateTime dt;
+ bool bg(false);
+#ifdef HAVE_CUPS_1_6
+ while (attr && ippGetGroupTag(attr) == group)
+ {
+ output << " <tr bgcolor=\"" << (bg ? "#ffffd9" : "#ffffff") << "\">\n <td><b>" << ippGetName(attr) << "</b></td>\n <td>" << endl;
+ bg = !bg;
+ for (int i=0; i<ippGetCount(attr); i++)
+ {
+ switch (ippGetValueTag(attr))
+ {
+ case IPP_TAG_INTEGER:
+ if (ippGetName(attr) && strstr(ippGetName(attr), "time"))
+ {
+ dt.setTime_t((unsigned int)(ippGetInteger(attr, i)));
+ output << dt.toString();
+ }
+ else
+ output << ippGetInteger(attr, i);
+ break;
+ case IPP_TAG_ENUM:
+ output << "0x" << hex << ippGetInteger(attr, i) << dec;
+ break;
+ case IPP_TAG_BOOLEAN:
+ output << (ippGetBoolean(attr, i) ? i18n("True") : i18n("False"));
+ break;
+ case IPP_TAG_STRING:
+ case IPP_TAG_TEXTLANG:
+ case IPP_TAG_NAMELANG:
+ case IPP_TAG_TEXT:
+ case IPP_TAG_NAME:
+ case IPP_TAG_KEYWORD:
+ case IPP_TAG_URI:
+ case IPP_TAG_CHARSET:
+ case IPP_TAG_LANGUAGE:
+ case IPP_TAG_MIMETYPE:
+ output << ippGetString(attr, i, NULL);
+ break;
+ case IPP_TAG_RESOLUTION:
+ int xres;
+ int yres;
+ ipp_res_t units;
+ xres = ippGetResolution(attr, i, &yres, &units);
+ output << "( " << xres
+ << ", " << yres << " )";
+ break;
+ case IPP_TAG_RANGE:
+ int lowervalue;
+ int uppervalue;
+ lowervalue = ippGetRange(attr, i, &uppervalue);
+ output << "[ " << (lowervalue > 0 ? lowervalue : 1)
+ << ", " << (uppervalue > 0 ? uppervalue : 65535) << " ]";
+ break;
+ case IPP_TAG_DATE:
+ d = ippGetDate(attr, i);
+ dateStr.sprintf("%.4d-%.2d-%.2d, %.2d:%.2d:%.2d %c%.2d%.2d",
+ d[0]*256+d[1], d[2], d[3],
+ d[4], d[5], d[6],
+ d[8], d[9], d[10]);
+ output << dateStr;
+ break;
+ default:
+ continue;
+ }
+ if (i < ippGetCount(attr)-1)
+ output << "<br>";
+ }
+ output << "</td>\n </tr>" << endl;
+ attr = ippNextAttribute(request_);
+#else // HAVE_CUPS_1_6
while (attr && attr->group_tag == group)
{
output << " <tr bgcolor=\"" << (bg ? "#ffffd9" : "#ffffff") << "\">\n <td><b>" << attr->name << "</b></td>\n <td>" << endl;
@@ -423,6 +596,7 @@
}
output << "</td>\n </tr>" << endl;
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
// end table
output << "</table>" << endl;
@@ -438,6 +612,59 @@
ipp_attribute_t *attr = first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (group != -1 && ippGetGroupTag(attr) != group)
+ {
+ attr = ippNextAttribute(request_);
+ continue;
+ }
+ QString value;
+ for (int i=0; i<ippGetCount(attr); i++)
+ {
+ switch (ippGetValueTag(attr))
+ {
+ case IPP_TAG_INTEGER:
+ case IPP_TAG_ENUM:
+ value.append(QString::number(ippGetInteger(attr, i))).append(",");
+ break;
+ case IPP_TAG_BOOLEAN:
+ value.append((ippGetBoolean(attr, i) ? "true" : "false")).append(",");
+ break;
+ case IPP_TAG_RANGE:
+ int lowervalue;
+ int uppervalue;
+ lowervalue = ippGetRange(attr, i, &uppervalue);
+ if (lowervalue > 0)
+ value.append(QString::number(lowervalue));
+ if (lowervalue != uppervalue)
+ {
+ value.append("-");
+ if (uppervalue > 0)
+ value.append(QString::number(uppervalue));
+ }
+ value.append(",");
+ break;
+ case IPP_TAG_STRING:
+ case IPP_TAG_TEXT:
+ case IPP_TAG_NAME:
+ case IPP_TAG_KEYWORD:
+ case IPP_TAG_URI:
+ case IPP_TAG_MIMETYPE:
+ case IPP_TAG_NAMELANG:
+ case IPP_TAG_TEXTLANG:
+ case IPP_TAG_CHARSET:
+ case IPP_TAG_LANGUAGE:
+ value.append(QString::fromLocal8Bit(ippGetString(attr, i, NULL))).append(",");
+ break;
+ default:
+ break;
+ }
+ }
+ if (!value.isEmpty())
+ value.truncate(value.length()-1);
+ opts[QString::fromLocal8Bit(ippGetName(attr))] = value;
+ attr = ippNextAttribute(request_);
+#else // HAVE_CUPS_1_6
if (group != -1 && attr->group_tag != group)
{
attr = attr->next;
@@ -486,6 +713,7 @@
value.truncate(value.length()-1);
opts[QString::fromLocal8Bit(attr->name)] = value;
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
}
return opts;
@@ -542,3 +770,11 @@
}
#endif
}
+
+#ifdef HAVE_CUPS_1_6
+ipp_attribute_t* IppRequest::first()
+{ return (request_ ? ippFirstAttribute(request_) : NULL); }
+#else // HAVE_CUPS_1_6
+ipp_attribute_t* IppRequest::first()
+{ return (request_ ? request_->attrs : NULL); }
+#endif // HAVE_CUPS_1_6
diff -ur kdelibs-3.5.10/kdeprint/cups/ipprequest.h kdelibs-3.5.10-cups16/kdeprint/cups/ipprequest.h
--- kdelibs-3.5.10/kdeprint/cups/ipprequest.h 2005-10-10 17:06:30.000000000 +0200
+++ kdelibs-3.5.10-cups16/kdeprint/cups/ipprequest.h 2012-12-25 16:37:50.000000000 +0100
@@ -27,6 +27,8 @@
#include <cups/ipp.h>
+#include "config.h"
+
class IppRequest
{
public:
@@ -72,7 +74,10 @@
bool keyword(const QString& name, QStringList& value);
bool mime(const QString& name, QString& value);
ipp_attribute_t* first();
+#ifndef HAVE_CUPS_1_6
ipp_attribute_t* last();
+#endif // HAVE_CUPS_1_6
+ ipp_t* request();
QMap<QString,QString> toMap(int group = -1);
void setMap(const QMap<QString,QString>& opts);
@@ -178,11 +183,10 @@
inline bool IppRequest::doRequest(const QString& res)
{ return doFileRequest(res); }
-inline ipp_attribute_t* IppRequest::first()
-{ return (request_ ? request_->attrs : NULL); }
-
+#ifndef HAVE_CUPS_1_6
inline ipp_attribute_t* IppRequest::last()
{ return (request_ ? request_->last : NULL); }
+#endif // HAVE_CUPS_1_6
inline void IppRequest::setHost(const QString& host)
{ host_ = host; }
@@ -193,4 +197,7 @@
inline void IppRequest::dump(int state)
{ dump_ = state; }
+inline ipp_t* IppRequest::request()
+{ return request_; }
+
#endif
diff -ur kdelibs-3.5.10/kdeprint/cups/kmcupsjobmanager.cpp kdelibs-3.5.10-cups16/kdeprint/cups/kmcupsjobmanager.cpp
--- kdelibs-3.5.10/kdeprint/cups/kmcupsjobmanager.cpp 2007-01-15 12:34:19.000000000 +0100
+++ kdelibs-3.5.10-cups16/kdeprint/cups/kmcupsjobmanager.cpp 2012-12-25 16:34:57.000000000 +0100
@@ -36,6 +36,8 @@
#include <kdebug.h>
#include <kurl.h>
+#include "config.h"
+
KMCupsJobManager::KMCupsJobManager(QObject *parent, const char *name, const QStringList & /*args*/)
: KMJobManager(parent,name)
{
@@ -166,10 +168,79 @@
void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr)
{
ipp_attribute_t *attr = req.first();
+ ipp_attribute_t *nextAttr;
KMJob *job = new KMJob();
QString uri;
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ QString name(ippGetName(attr));
+ if (name == "job-id") job->setId(ippGetInteger(attr, 0));
+ else if (name == "job-uri") job->setUri(QString::fromLocal8Bit(ippGetString(attr, 0, NULL)));
+ else if (name == "job-name") job->setName(QString::fromLocal8Bit(ippGetString(attr, 0, NULL)));
+ else if (name == "job-state")
+ {
+ switch (ippGetInteger(attr, 0))
+ {
+ case IPP_JOB_PENDING:
+ job->setState(KMJob::Queued);
+ break;
+ case IPP_JOB_HELD:
+ job->setState(KMJob::Held);
+ break;
+ case IPP_JOB_PROCESSING:
+ job->setState(KMJob::Printing);
+ break;
+ case IPP_JOB_STOPPED:
+ job->setState(KMJob::Error);
+ break;
+ case IPP_JOB_CANCELLED:
+ job->setState(KMJob::Cancelled);
+ break;
+ case IPP_JOB_ABORTED:
+ job->setState(KMJob::Aborted);
+ break;
+ case IPP_JOB_COMPLETED:
+ job->setState(KMJob::Completed);
+ break;
+ default:
+ job->setState(KMJob::Unknown);
+ break;
+ }
+ }
+ else if (name == "job-k-octets") job->setSize(ippGetInteger(attr, 0));
+ else if (name == "job-originating-user-name") job->setOwner(QString::fromLocal8Bit(ippGetString(attr, 0, NULL)));
+ else if (name == "job-k-octets-completed") job->setProcessedSize(ippGetInteger(attr, 0));
+ else if (name == "job-media-sheets") job->setPages(ippGetInteger(attr, 0));
+ else if (name == "job-media-sheets-completed") job->setProcessedPages(ippGetInteger(attr, 0));
+ else if (name == "job-printer-uri" && !pr->isRemote())
+ {
+ QString str(ippGetString(attr, 0, NULL));
+ int p = str.findRev('/');
+ if (p != -1)
+ job->setPrinter(str.mid(p+1));
+ }
+ else if (name == "job-priority")
+ {
+ job->setAttribute(0, QString::fromLatin1("%1").arg(ippGetInteger(attr, 0), 3));
+ }
+ else if (name == "job-billing")
+ {
+ job->setAttributeCount(2);
+ job->setAttribute(1, QString::fromLocal8Bit(ippGetString(attr, 0, NULL)));
+ }
+
+ nextAttr = ippNextAttribute(req.request());
+ if (name.isEmpty() || (!nextAttr))
+ {
+ if (job->printer().isEmpty())
+ job->setPrinter(pr->printerName());
+ job->setRemote(pr->isRemote());
+ addJob(job); // don't use job after this call !!!
+ job = new KMJob();
+ }
+ attr = nextAttr;
+#else // HAVE_CUPS_1_6
QString name(attr->name);
if (name == "job-id") job->setId(attr->values[0].integer);
else if (name == "job-uri") job->setUri(QString::fromLocal8Bit(attr->values[0].string.text));
@@ -236,6 +307,7 @@
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
delete job;
}
diff -ur kdelibs-3.5.10/kdeprint/cups/kmcupsmanager.cpp kdelibs-3.5.10-cups16/kdeprint/cups/kmcupsmanager.cpp
--- kdelibs-3.5.10/kdeprint/cups/kmcupsmanager.cpp 2007-01-15 12:34:19.000000000 +0100
+++ kdelibs-3.5.10-cups16/kdeprint/cups/kmcupsmanager.cpp 2012-12-25 16:34:57.000000000 +0100
@@ -476,9 +476,59 @@
void KMCupsManager::processRequest(IppRequest* req)
{
ipp_attribute_t *attr = req->first();
+ ipp_attribute_t *nextAttr;
KMPrinter *printer = new KMPrinter();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ QString attrname(ippGetName(attr));
+ if (attrname == "printer-name")
+ {
+ QString value = QString::fromLocal8Bit(ippGetString(attr, 0, NULL));
+ printer->setName(value);
+ printer->setPrinterName(value);
+ }
+ else if (attrname == "printer-type")
+ {
+ int value = ippGetInteger(attr, 0);
+ printer->setType(0);
+ printer->addType(((value & CUPS_PRINTER_CLASS) || (value & CUPS_PRINTER_IMPLICIT) ? KMPrinter::Class : KMPrinter::Printer));
+ if ((value & CUPS_PRINTER_REMOTE)) printer->addType(KMPrinter::Remote);
+ if ((value & CUPS_PRINTER_IMPLICIT)) printer->addType(KMPrinter::Implicit);
+
+ // convert printer-type attribute
+ printer->setPrinterCap( ( value & CUPS_PRINTER_OPTIONS ) >> 2 );
+ }
+ else if (attrname == "printer-state")
+ {
+ switch (ippGetInteger(attr, 0))
+ {
+ case IPP_PRINTER_IDLE: printer->setState(KMPrinter::Idle); break;
+ case IPP_PRINTER_PROCESSING: printer->setState(KMPrinter::Processing); break;
+ case IPP_PRINTER_STOPPED: printer->setState(KMPrinter::Stopped); break;
+ }
+ }
+ else if (attrname == "printer-uri-supported")
+ {
+ printer->setUri(KURL(ippGetString(attr, 0, NULL)));
+ }
+ else if (attrname == "printer-location")
+ {
+ printer->setLocation(QString::fromLocal8Bit(ippGetString(attr, 0, NULL)));
+ }
+ else if (attrname == "printer-is-accepting-jobs")
+ {
+ printer->setAcceptJobs(ippGetBoolean(attr, 0));
+ }
+
+ nextAttr = ippNextAttribute(req->request());
+ if (attrname.isEmpty() || (!nextAttr))
+ {
+ addPrinter(printer);
+ printer = new KMPrinter();
+ }
+ attr = nextAttr;
+#else // HAVE_CUPS_1_6
QString attrname(attr->name);
if (attrname == "printer-name")
{
@@ -524,6 +574,7 @@
printer = new KMPrinter();
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
delete printer;
}
@@ -817,6 +868,7 @@
{
QStringList list;
IppRequest req;
+ ipp_attribute_t *nextAttr;
req.setOperation(CUPS_GET_DEVICES);
if (req.doRequest("/"))
{
@@ -824,6 +876,24 @@
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ QString attrname(ippGetName(attr));
+ if (attrname == "device-info") desc = ippGetString(attr, 0, NULL);
+ else if (attrname == "device-make-and-model") printer = ippGetString(attr, 0, NULL);
+ else if (attrname == "device-uri") uri = ippGetString(attr, 0, NULL);
+ else if ( attrname == "device-class" ) cl = ippGetString(attr, 0, NULL);
+ nextAttr = ippNextAttribute(req.request());
+ if (attrname.isEmpty() || (!nextAttr))
+ {
+ if (!uri.isEmpty())
+ {
+ if (printer == "Unknown") printer = QString::null;
+ list << cl << uri << desc << printer;
+ }
+ uri = desc = printer = cl = QString::null;
+ }
+ attr = nextAttr;
+#else // HAVE_CUPS_1_6
QString attrname(attr->name);
if (attrname == "device-info") desc = attr->values[0].string.text;
else if (attrname == "device-make-and-model") printer = attr->values[0].string.text;
@@ -839,6 +909,7 @@
uri = desc = printer = cl = QString::null;
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
}
return list;
diff -ur kdelibs-3.5.10/kdeprint/cups/kmcupsuimanager.cpp kdelibs-3.5.10-cups16/kdeprint/cups/kmcupsuimanager.cpp
--- kdelibs-3.5.10/kdeprint/cups/kmcupsuimanager.cpp 2006-10-01 19:33:43.000000000 +0200
+++ kdelibs-3.5.10-cups16/kdeprint/cups/kmcupsuimanager.cpp 2012-12-25 16:34:57.000000000 +0100
@@ -60,6 +60,8 @@
#include <kaction.h>
#include <kmessagebox.h>
+#include "config.h"
+
KMCupsUiManager::KMCupsUiManager(QObject *parent, const char *name, const QStringList & /*args*/)
: KMUiManager(parent,name)
{
@@ -143,6 +145,24 @@
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (ippGetName(attr) && strcmp(ippGetName(attr),"device-uri") == 0)
+ {
+ if (strncmp(ippGetString(attr, 0, NULL),"socket",6) == 0) backend->enableBackend(KMWizard::TCP,true);
+ else if (strncmp(ippGetString(attr, 0, NULL),"parallel",8) == 0) backend->enableBackend(KMWizard::Local,true);
+ else if (strncmp(ippGetString(attr, 0, NULL),"serial",6) == 0) backend->enableBackend(KMWizard::Local,true);
+ else if (strncmp(ippGetString(attr, 0, NULL),"smb",3) == 0) backend->enableBackend(KMWizard::SMB,true);
+ else if (strncmp(ippGetString(attr, 0, NULL),"lpd",3) == 0) backend->enableBackend(KMWizard::LPD,true);
+ else if (strncmp(ippGetString(attr, 0, NULL),"usb",3) == 0) backend->enableBackend(KMWizard::Local,true);
+ else if (strncmp(ippGetString(attr, 0, NULL),"http",4) == 0 || strncmp(ippGetString(attr, 0, NULL),"ipp",3) == 0)
+ {
+ backend->enableBackend(KMWizard::IPP,true);
+ backend->enableBackend(KMWizard::Custom+1,true);
+ }
+ else if (strncmp(ippGetString(attr, 0, NULL),"fax",3) == 0) backend->enableBackend(KMWizard::Custom+2,true);
+ }
+ attr = ippNextAttribute(req.request());
+#else // HAVE_CUPS_1_6
if (attr->name && strcmp(attr->name,"device-uri") == 0)
{
if (strncmp(attr->values[0].string.text,"socket",6) == 0) backend->enableBackend(KMWizard::TCP,true);
@@ -159,6 +179,7 @@
else if (strncmp(attr->values[0].string.text,"fax",3) == 0) backend->enableBackend(KMWizard::Custom+2,true);
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
backend->enableBackend(KMWizard::Class, true);
backend->enableBackend(KMWizard::Custom+5, true);
diff -ur kdelibs-3.5.10/kdeprint/cups/kmwfax.cpp kdelibs-3.5.10-cups16/kdeprint/cups/kmwfax.cpp
--- kdelibs-3.5.10/kdeprint/cups/kmwfax.cpp 2007-01-15 12:34:19.000000000 +0100
+++ kdelibs-3.5.10-cups16/kdeprint/cups/kmwfax.cpp 2012-12-25 16:34:57.000000000 +0100
@@ -30,6 +30,8 @@
#include <kiconloader.h>
#include <kurl.h>
+#include "config.h"
+
KMWFax::KMWFax(QWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
@@ -55,11 +57,19 @@
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (ippGetName(attr) && strcmp(ippGetName(attr),"device-uri") == 0 && strncmp(ippGetString(attr, 0, NULL),"fax",3) == 0)
+ {
+ m_list->insertItem(SmallIcon("blockdevice"),QString::fromLatin1(ippGetString(attr, 0, NULL)));
+ }
+ attr = ippNextAttribute(req.request());
+#else // HAVE_CUPS_1_6
if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0)
{
m_list->insertItem(SmallIcon("blockdevice"),QString::fromLatin1(attr->values[0].string.text));
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
}
}
diff -ur kdelibs-3.5.10/kdeprint/cups/kmwippselect.cpp kdelibs-3.5.10-cups16/kdeprint/cups/kmwippselect.cpp
--- kdelibs-3.5.10/kdeprint/cups/kmwippselect.cpp 2007-01-15 12:34:19.000000000 +0100
+++ kdelibs-3.5.10-cups16/kdeprint/cups/kmwippselect.cpp 2012-12-25 16:34:57.000000000 +0100
@@ -29,6 +29,8 @@
#include <kdebug.h>
#include <kiconloader.h>
+#include "config.h"
+
KMWIppSelect::KMWIppSelect(QWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
@@ -83,9 +85,15 @@
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (ippGetName(attr) && strcmp(ippGetName(attr),"printer-name") == 0)
+ m_list->insertItem(SmallIcon("kdeprint_printer"),QString::fromLatin1(ippGetString(attr, 0, NULL)));
+ attr = ippNextAttribute(req.request());
+#else // HAVE_CUPS_1_6
if (attr->name && strcmp(attr->name,"printer-name") == 0)
m_list->insertItem(SmallIcon("kdeprint_printer"),QString::fromLatin1(attr->values[0].string.text));
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
m_list->sort();
}

View File

@ -1,159 +0,0 @@
diff -ur kdelibs-3.5.10/kdeprint/cups/cupsdconf2/cups-util.c kdelibs-3.5.10-cups20/kdeprint/cups/cupsdconf2/cups-util.c
--- kdelibs-3.5.10/kdeprint/cups/cupsdconf2/cups-util.c 2007-10-08 11:52:10.000000000 +0200
+++ kdelibs-3.5.10-cups20/kdeprint/cups/cupsdconf2/cups-util.c 2014-11-25 21:41:51.000000000 +0100
@@ -32,7 +32,7 @@
char prompt[1024]; /* Prompt string */
int digest_tries; /* Number of tries with Digest */
static char filename[HTTP_MAX_URI]; /* Local filename */
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
const char *fqdn = 0;
#else
char fqdn[ HTTP_MAX_URI ]; /* Server name buffer */
@@ -118,7 +118,7 @@
* See if we should retry the current digest password...
*/
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
www_authenticate = cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE];
#else
www_authenticate = httpGetField( cups_server, HTTP_FIELD_WWW_AUTHENTICATE );
@@ -129,7 +129,7 @@
/*
* Nope - get a password from the user...
*/
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
fqdn = cups_server->hostname;
#else
httpGetHostname( cups_server, fqdn, sizeof( fqdn ) );
@@ -154,7 +154,7 @@
* Got a password; encode it for the server...
*/
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
www_authenticate = cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE];
#else
www_authenticate = httpGetField( cups_server, HTTP_FIELD_WWW_AUTHENTICATE );
@@ -166,7 +166,7 @@
*/
snprintf(plain, sizeof(plain), "%s:%s", cupsUser(), pwdstring);
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2)
httpEncode64_2(encode, sizeof(encode), plain, sizeof(plain));
#else
httpEncode64(encode, plain);
@@ -235,7 +235,7 @@
*/
while ((bytes =
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
httpRead
#else
httpRead2
@@ -265,7 +265,7 @@
http_status_t status; /* HTTP status from server */
char prompt[1024]; /* Prompt string */
int digest_tries; /* Number of tries with Digest */
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
const char *fqdn = 0;
#else
char fqdn[ HTTP_MAX_URI ]; /* Server name buffer */
@@ -340,7 +340,7 @@
break;
}
else
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
httpWrite
#else
httpWrite2
@@ -349,7 +349,7 @@
if (status == HTTP_CONTINUE)
{
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
httpWrite
#else
httpWrite2
@@ -380,7 +380,7 @@
* See if we should retry the current digest password...
*/
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
www_authenticate = cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE];
#else
www_authenticate = httpGetField( cups_server, HTTP_FIELD_WWW_AUTHENTICATE );
@@ -393,7 +393,7 @@
*/
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
fqdn = cups_server->hostname;
#else
httpGetHostname( cups_server, fqdn, sizeof( fqdn ) );
@@ -417,7 +417,7 @@
* Got a password; encode it for the server...
*/
-#if CUPS_VERSION_MAJOR - 0 <= 1 && CUPS_VERSION_MINOR - 0 < 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR < 2)
www_authenticate = cups_server->fields[HTTP_FIELD_WWW_AUTHENTICATE];
#else
www_authenticate = httpGetField( cups_server, HTTP_FIELD_WWW_AUTHENTICATE );
@@ -429,7 +429,7 @@
*/
snprintf(plain, sizeof(plain), "%s:%s", cupsUser(), pwdstring);
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2)
httpEncode64_2(encode, sizeof(encode), plain, sizeof(plain));
#else
httpEncode64(encode, plain);
@@ -511,7 +511,7 @@
* See if we are accessing localhost...
the struct has changed in newer versions - PiggZ (adam@piggz.co.uk)
*/
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2)
if (!httpAddrLocalhost(http))
#else
if (ntohl(*(int*)&http->hostaddr.sin_addr) != 0x7f000001 &&
diff -ur kdelibs-3.5.10/kdeprint/cups/ipprequest.cpp kdelibs-3.5.10-cups20/kdeprint/cups/ipprequest.cpp
--- kdelibs-3.5.10/kdeprint/cups/ipprequest.cpp 2007-10-08 11:52:10.000000000 +0200
+++ kdelibs-3.5.10-cups20/kdeprint/cups/ipprequest.cpp 2014-11-25 21:41:51.000000000 +0100
@@ -310,7 +310,7 @@
}
#ifdef HAVE_CUPS_NO_PWD_CACHE
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR <= 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR <= 2)
strncpy( HTTP->authstring, cups_authstring.data(), HTTP_MAX_VALUE );
#else
httpSetAuthString( HTTP, NULL, cups_authstring.data() );
@@ -324,7 +324,7 @@
request_ = cupsDoFileRequest(HTTP, request_, (res.isEmpty() ? "/" : res.latin1()), (filename.isEmpty() ? NULL : filename.latin1()));
#ifdef HAVE_CUPS_NO_PWD_CACHE
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR <= 2
+#if CUPS_VERSION_MAJOR < 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR <= 2)
cups_authstring = HTTP->authstring;
#else
cups_authstring = httpGetAuthString( HTTP );
@@ -523,7 +523,7 @@
cupsFreeOptions(n, options);
// find an remove that annoying "document-format" attribute
-#if CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR >= 2)
ipp_attribute_t *attr = ippFindAttribute(request_, "document-format", IPP_TAG_NAME);
ippDeleteAttribute(request_, attr);
#else

View File

@ -1,11 +0,0 @@
diff -ur kdelibs-3.5.10/kdeprint/cups/cupsaddsmb2.cpp kdelibs-3.5.10-cups22/kdeprint/cups/cupsaddsmb2.cpp
--- kdelibs-3.5.10/kdeprint/cups/cupsaddsmb2.cpp 2005-10-10 17:06:30.000000000 +0200
+++ kdelibs-3.5.10-cups22/kdeprint/cups/cupsaddsmb2.cpp 2016-09-28 19:23:09.264863318 +0200
@@ -39,6 +39,7 @@
#include <kstdguiitem.h>
#include <cups/cups.h>
+#include <cups/ppd.h>
#include <ctype.h>
CupsAddSmb::CupsAddSmb(QWidget *parent, const char *name)

View File

@ -1,42 +0,0 @@
diff -ur kdelibs-3.5.10/khtml/css/cssparser.cpp kdelibs-3.5.10-cve-2009-1698/khtml/css/cssparser.cpp
--- kdelibs-3.5.10/khtml/css/cssparser.cpp 2007-01-15 12:34:04.000000000 +0100
+++ kdelibs-3.5.10-cve-2009-1698/khtml/css/cssparser.cpp 2009-07-26 05:46:39.000000000 +0200
@@ -1344,6 +1344,14 @@
if ( args->size() != 1)
return false;
Value *a = args->current();
+ if (a->unit != CSSPrimitiveValue::CSS_IDENT) {
+ isValid=false;
+ break;
+ }
+ if (qString(a->string)[0] == '-') {
+ isValid=false;
+ break;
+ }
parsedValue = new CSSPrimitiveValueImpl(domString(a->string), CSSPrimitiveValue::CSS_ATTR);
}
else
@@ -1396,7 +1404,8 @@
CounterImpl *counter = new CounterImpl;
Value *i = args->current();
-// if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid;
+ if (i->unit != CSSPrimitiveValue::CSS_IDENT) goto invalid;
+ if (qString(i->string)[0] == '-') goto invalid;
counter->m_identifier = domString(i->string);
if (counters) {
i = args->next();
diff -ur kdelibs-3.5.10/khtml/css/css_valueimpl.cpp kdelibs-3.5.10-cve-2009-1698/khtml/css/css_valueimpl.cpp
--- kdelibs-3.5.10/khtml/css/css_valueimpl.cpp 2006-07-22 10:16:49.000000000 +0200
+++ kdelibs-3.5.10-cve-2009-1698/khtml/css/css_valueimpl.cpp 2009-07-26 05:45:36.000000000 +0200
@@ -736,7 +736,9 @@
text = getValueName(m_value.ident);
break;
case CSSPrimitiveValue::CSS_ATTR:
- // ###
+ text = "attr(";
+ text += DOMString( m_value.string );
+ text += ")";
break;
case CSSPrimitiveValue::CSS_COUNTER:
text = "counter(";

View File

@ -1,13 +0,0 @@
Index: khtml/html/htmltokenizer.cpp
===================================================================
--- khtml/html/htmltokenizer.cpp (revision 1002163)
+++ khtml/html/htmltokenizer.cpp (revision 1002164)
@@ -736,7 +736,7 @@
#ifdef TOKEN_DEBUG
kdDebug( 6036 ) << "unknown entity!" << endl;
#endif
- checkBuffer(10);
+ checkBuffer(11);
// ignore the sequence, add it to the buffer as plaintext
*dest++ = '&';
for(unsigned int i = 0; i < cBufferPos; i++)

View File

@ -1,30 +0,0 @@
diff -ur kdelibs-3.5.10/khtml/ecma/kjs_html.cpp kdelibs-3.5.10-cve-2009-2537-select-length/khtml/ecma/kjs_html.cpp
--- kdelibs-3.5.10/khtml/ecma/kjs_html.cpp 2008-02-13 10:41:09.000000000 +0100
+++ kdelibs-3.5.10-cve-2009-2537-select-length/khtml/ecma/kjs_html.cpp 2009-07-26 04:54:52.000000000 +0200
@@ -62,6 +62,9 @@
#include <kdebug.h>
+// CVE-2009-2537 (vendors agreed on max 10000 elements)
+#define MAX_SELECT_LENGTH 10000
+
namespace KJS {
KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(HTMLDocumentProto, DOMDocumentProto)
@@ -2550,8 +2553,14 @@
case SelectValue: { select.setValue(str); return; }
case SelectLength: { // read-only according to the NS spec, but webpages need it writeable
Object coll = Object::dynamicCast( getSelectHTMLCollection(exec, select.options(), select) );
- if ( coll.isValid() )
- coll.put(exec,"length",value);
+
+ if ( coll.isValid() ) {
+ if (value.toInteger(exec) >= MAX_SELECT_LENGTH) {
+ Object err = Error::create(exec, RangeError);
+ exec->setException(err);
+ } else
+ coll.put(exec, "length", value);
+ }
return;
}
// read-only: form

View File

@ -1,635 +0,0 @@
diff -up kdelibs-3.5.10/kjs/dtoa.cpp.orig kdelibs-3.5.10/kjs/dtoa.cpp
--- kdelibs-3.5.10/kjs/dtoa.cpp.orig 2009-12-09 18:32:22.000000000 +0100
+++ kdelibs-3.5.10/kjs/dtoa.cpp 2009-12-09 18:32:36.000000000 +0100
@@ -174,9 +174,10 @@
#undef CONST
#endif
+#include "dtoa.h"
#include <config.h>
-#include "stdlib.h"
+#include "global.h"
#ifdef WORDS_BIGENDIAN
#define IEEE_MC68k
@@ -184,7 +185,6 @@
#define IEEE_8087
#endif
#define INFNAN_CHECK
-#include "dtoa.h"
@@ -196,22 +196,19 @@ typedef unsigned Long ULong;
#endif
#ifdef DEBUG
-#include "stdio.h"
+#include <stdio.h>
#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
#endif
-#include "string.h"
+#include <stdlib.h>
+#include <string.h>
#ifdef USE_LOCALE
-#include "locale.h"
+#include <locale.h>
#endif
#ifdef MALLOC
-#ifdef KR_headers
-extern char *MALLOC();
-#else
extern void *MALLOC(size_t);
-#endif
#else
#define MALLOC malloc
#endif
@@ -233,7 +230,7 @@ static double private_mem[PRIVATE_mem],
#define IEEE_Arith
#endif
-#include "errno.h"
+#include <errno.h>
#ifdef Bad_float_h
@@ -260,25 +257,29 @@ static double private_mem[PRIVATE_mem],
#define DBL_MAX 1.7014118346046923e+38
#endif
+#ifndef LONG_MAX
+#define LONG_MAX 2147483647
+#endif
+
#else /* ifndef Bad_float_h */
-#include "float.h"
+#include <float.h>
#endif /* Bad_float_h */
#ifndef __MATH_H__
-#include "math.h"
+#include <math.h>
#endif
+#define strtod kjs_strtod
+#define dtoa kjs_dtoa
+#define freedtoa kjs_freedtoa
+
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CONST
-#ifdef KR_headers
-#define CONST /* blank */
-#else
#define CONST const
#endif
-#endif
#if defined(IEEE_8087) + defined(IEEE_MC68k) + defined(VAX) + defined(IBM) != 1
Exactly one of IEEE_8087, IEEE_MC68k, VAX, or IBM should be defined.
@@ -286,37 +287,19 @@ Exactly one of IEEE_8087, IEEE_MC68k, VA
typedef union { double d; ULong L[2]; } U;
-#ifdef YES_ALIAS
-#define dval(x) x
+#define dval(x) (x).d
#ifdef IEEE_8087
-#define word0(x) ((ULong *)&x)[1]
-#define word1(x) ((ULong *)&x)[0]
+#define word0(x) (x).L[1]
+#define word1(x) (x).L[0]
#else
-#define word0(x) ((ULong *)&x)[0]
-#define word1(x) ((ULong *)&x)[1]
-#endif
-#else
-#ifdef IEEE_8087
-#define word0(x) ((U*)&x)->L[1]
-#define word1(x) ((U*)&x)->L[0]
-#else
-#define word0(x) ((U*)&x)->L[0]
-#define word1(x) ((U*)&x)->L[1]
-#endif
-#define dval(x) ((U*)&x)->d
+#define word0(x) (x).L[0]
+#define word1(x) (x).L[1]
#endif
/* The following definition of Storeinc is appropriate for MIPS processors.
* An alternative that might be better on some machines is
- * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/
-#if defined(IEEE_8087) + defined(VAX)
-#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
-((unsigned short *)a)[0] = (unsigned short)c, a++)
-#else
-#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \
-((unsigned short *)a)[1] = (unsigned short)c, a++)
-#endif
+#define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
/* #define P DBL_MANT_DIG */
/* Ten_pmax = floor(P*log(2)/log(5)) */
@@ -440,11 +423,7 @@ typedef union { double d; ULong L[2]; }
#ifdef RND_PRODQUOT
#define rounded_product(a,b) a = rnd_prod(a, b)
#define rounded_quotient(a,b) a = rnd_quot(a, b)
-#ifdef KR_headers
-extern double rnd_prod(), rnd_quot();
-#else
extern double rnd_prod(double, double), rnd_quot(double, double);
-#endif
#else
#define rounded_product(a,b) a *= b
#define rounded_quotient(a,b) a /= b
@@ -457,11 +436,7 @@ extern double rnd_prod(double, double),
#define Pack_32
#endif
-#ifdef KR_headers
-#define FFFFFFFF ((((unsigned long)0xffff)<<16)|(unsigned long)0xffff)
-#else
#define FFFFFFFF 0xffffffffUL
-#endif
#ifdef NO_LONG_LONG
#undef ULLong
@@ -487,7 +462,7 @@ extern double rnd_prod(double, double),
#define FREE_DTOA_LOCK(n) /*nothing*/
#endif
-#define Kmax 15
+#define Kmax (sizeof(size_t) << 3)
struct
Bigint {
@@ -502,11 +477,7 @@ Bigint {
static Bigint *
Balloc
-#ifdef KR_headers
- (k) int k;
-#else
(int k)
-#endif
{
int x;
Bigint *rv;
@@ -525,7 +496,7 @@ Balloc
#else
len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
/sizeof(double);
- if (pmem_next - private_mem + len <= PRIVATE_mem) {
+ if (pmem_next - private_mem + len <= (unsigned)PRIVATE_mem) {
rv = (Bigint*)pmem_next;
pmem_next += len;
}
@@ -542,11 +513,7 @@ Balloc
static void
Bfree
-#ifdef KR_headers
- (v) Bigint *v;
-#else
(Bigint *v)
-#endif
{
if (v) {
ACQUIRE_DTOA_LOCK(0);
@@ -561,11 +528,7 @@ y->wds*sizeof(Long) + 2*sizeof(int))
static Bigint *
multadd
-#ifdef KR_headers
- (b, m, a) Bigint *b; int m, a;
-#else
(Bigint *b, int m, int a) /* multiply by m and add a */
-#endif
{
int i, wds;
#ifdef ULLong
@@ -587,7 +550,7 @@ multadd
#ifdef ULLong
y = *x * (ULLong)m + carry;
carry = y >> 32;
- *x++ = y & FFFFFFFF;
+ *x++ = (ULong)y & FFFFFFFF;
#else
#ifdef Pack_32
xi = *x;
@@ -610,7 +573,7 @@ multadd
Bfree(b);
b = b1;
}
- b->x[wds++] = carry;
+ b->x[wds++] = (ULong)carry;
b->wds = wds;
}
return b;
@@ -618,11 +581,7 @@ multadd
static Bigint *
s2b
-#ifdef KR_headers
- (s, nd0, nd, y9) CONST char *s; int nd0, nd; ULong y9;
-#else
(CONST char *s, int nd0, int nd, ULong y9)
-#endif
{
Bigint *b;
int i, k;
@@ -656,11 +615,7 @@ s2b
static int
hi0bits
-#ifdef KR_headers
- (x) register ULong x;
-#else
(register ULong x)
-#endif
{
register int k = 0;
@@ -690,11 +645,7 @@ hi0bits
static int
lo0bits
-#ifdef KR_headers
- (y) ULong *y;
-#else
(ULong *y)
-#endif
{
register int k;
register ULong x = *y;
@@ -738,11 +689,7 @@ lo0bits
static Bigint *
i2b
-#ifdef KR_headers
- (i) int i;
-#else
(int i)
-#endif
{
Bigint *b;
@@ -754,11 +701,7 @@ i2b
static Bigint *
mult
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
(Bigint *a, Bigint *b)
-#endif
{
Bigint *c;
int k, wa, wb, wc;
@@ -801,10 +744,10 @@ mult
do {
z = *x++ * (ULLong)y + *xc + carry;
carry = z >> 32;
- *xc++ = z & FFFFFFFF;
+ *xc++ = (ULong)z & FFFFFFFF;
}
while(x < xae);
- *xc = carry;
+ *xc = (ULong)carry;
}
}
#else
@@ -866,11 +809,7 @@ mult
static Bigint *
pow5mult
-#ifdef KR_headers
- (b, k) Bigint *b; int k;
-#else
(Bigint *b, int k)
-#endif
{
Bigint *b1, *p5, *p51;
int i;
@@ -923,11 +862,7 @@ pow5mult
static Bigint *
lshift
-#ifdef KR_headers
- (b, k) Bigint *b; int k;
-#else
(Bigint *b, int k)
-#endif
{
int i, k1, n, n1;
Bigint *b1;
@@ -983,11 +918,7 @@ lshift
static int
cmp
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
(Bigint *a, Bigint *b)
-#endif
{
ULong *xa, *xa0, *xb, *xb0;
int i, j;
@@ -1017,11 +948,7 @@ cmp
static Bigint *
diff
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
(Bigint *a, Bigint *b)
-#endif
{
Bigint *c;
int i, wa, wb;
@@ -1064,13 +991,13 @@ diff
do {
y = (ULLong)*xa++ - *xb++ - borrow;
borrow = y >> 32 & (ULong)1;
- *xc++ = y & FFFFFFFF;
+ *xc++ = (ULong)y & FFFFFFFF;
}
while(xb < xbe);
while(xa < xae) {
y = *xa++ - borrow;
borrow = y >> 32 & (ULong)1;
- *xc++ = y & FFFFFFFF;
+ *xc++ = (ULong)y & FFFFFFFF;
}
#else
#ifdef Pack_32
@@ -1111,15 +1038,12 @@ diff
static double
ulp
-#ifdef KR_headers
- (x) double x;
-#else
- (double x)
-#endif
+ (double dx)
{
register Long L;
- double a;
+ U x, a;
+ dval(x) = dx;
L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
#ifndef Avoid_Underflow
#ifndef Sudden_Underflow
@@ -1153,15 +1077,11 @@ ulp
static double
b2d
-#ifdef KR_headers
- (a, e) Bigint *a; int *e;
-#else
(Bigint *a, int *e)
-#endif
{
ULong *xa, *xa0, w, y, z;
int k;
- double d;
+ U d;
#ifdef VAX
ULong d0, d1;
#else
@@ -1223,12 +1143,9 @@ b2d
static Bigint *
d2b
-#ifdef KR_headers
- (d, e, bits) double d; int *e, *bits;
-#else
- (double d, int *e, int *bits)
-#endif
+ (double dd, int *e, int *bits)
{
+ U d;
Bigint *b;
int de, k;
ULong *x, y, z;
@@ -1237,6 +1154,9 @@ d2b
#endif
#ifdef VAX
ULong d0, d1;
+#endif
+ dval(d) = dd;
+#ifdef VAX
d0 = word0(d) >> 16 | word0(d) << 16;
d1 = word1(d) >> 16 | word1(d) << 16;
#else
@@ -1361,13 +1281,9 @@ d2b
static double
ratio
-#ifdef KR_headers
- (a, b) Bigint *a, *b;
-#else
(Bigint *a, Bigint *b)
-#endif
{
- double da, db;
+ U da, db;
int k, ka, kb;
dval(da) = b2d(a, &ka);
@@ -1453,11 +1369,7 @@ static CONST double tinytens[] = { 1e-16
static int
match
-#ifdef KR_headers
- (sp, t) char **sp, *t;
-#else
(CONST char **sp, CONST char *t)
-#endif
{
int c, d;
CONST char *s = *sp;
@@ -1475,11 +1387,7 @@ match
#ifndef No_Hex_NaN
static void
hexnan
-#ifdef KR_headers
- (rvp, sp) double *rvp; CONST char **sp;
-#else
- (double *rvp, CONST char **sp)
-#endif
+ (U *rvp, CONST char **sp)
{
ULong c, x[2];
CONST char *s;
@@ -1528,12 +1436,8 @@ hexnan
#endif /* INFNAN_CHECK */
double
-kjs_strtod
-#ifdef KR_headers
- (s00, se) CONST char *s00; char **se;
-#else
+strtod
(CONST char *s00, char **se)
-#endif
{
#ifdef Avoid_Underflow
int scale;
@@ -1541,7 +1445,8 @@ kjs_strtod
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
CONST char *s, *s0, *s1;
- double aadj, aadj1, adj, rv, rv0;
+ double aadj, aadj1, adj;
+ U aadj2, rv, rv0;
Long L;
ULong y, z;
Bigint *bb = NULL, *bb1 = NULL, *bd = NULL, *bd0 = NULL, *bs = NULL, *delta = NULL;
@@ -2302,7 +2207,9 @@ kjs_strtod
aadj = z;
aadj1 = dsign ? aadj : -aadj;
}
- word0(aadj1) += (2*P+1)*Exp_msk1 - y;
+ dval(aadj2) = aadj1;
+ word0(aadj2) += (2*P+1)*Exp_msk1 - y;
+ aadj1 = dval(aadj2);
}
adj = aadj1 * ulp(dval(rv));
dval(rv) += adj;
@@ -2419,11 +2326,7 @@ kjs_strtod
static int
quorem
-#ifdef KR_headers
- (b, S) Bigint *b, *S;
-#else
(Bigint *b, Bigint *S)
-#endif
{
int n;
ULong *bx, *bxe, q, *sx, *sxe;
@@ -2461,7 +2364,7 @@ quorem
carry = ys >> 32;
y = *bx - (ys & FFFFFFFF) - borrow;
borrow = y >> 32 & (ULong)1;
- *bx++ = y & FFFFFFFF;
+ *bx++ = (ULong)y & FFFFFFFF;
#else
#ifdef Pack_32
si = *sx++;
@@ -2502,7 +2405,7 @@ quorem
carry = ys >> 32;
y = *bx - (ys & FFFFFFFF) - borrow;
borrow = y >> 32 & (ULong)1;
- *bx++ = y & FFFFFFFF;
+ *bx++ = (ULong)y & FFFFFFFF;
#else
#ifdef Pack_32
si = *sx++;
@@ -2540,11 +2443,7 @@ quorem
#endif
static char *
-#ifdef KR_headers
-rv_alloc(i) int i;
-#else
rv_alloc(int i)
-#endif
{
int j, k, *r;
@@ -2563,11 +2462,7 @@ rv_alloc(int i)
}
static char *
-#ifdef KR_headers
-nrv_alloc(s, rve, n) char *s, **rve; int n;
-#else
nrv_alloc(CONST char *s, char **rve, int n)
-#endif
{
char *rv, *t;
@@ -2585,11 +2480,7 @@ nrv_alloc(CONST char *s, char **rve, int
*/
void
-#ifdef KR_headers
-kjs_freedtoa(s) char *s;
-#else
-kjs_freedtoa(char *s)
-#endif
+freedtoa(char *s)
{
Bigint *b = (Bigint *)((int *)s - 1);
b->maxwds = 1 << (b->k = *(int*)b);
@@ -2635,13 +2526,8 @@ kjs_freedtoa(char *s)
*/
char *
-kjs_dtoa
-#ifdef KR_headers
- (d, mode, ndigits, decpt, sign, rve)
- double d; int mode, ndigits, *decpt, *sign; char **rve;
-#else
- (double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
-#endif
+dtoa
+ (double dd, int mode, int ndigits, int *decpt, int *sign, char **rve)
{
/* Arguments ndigits, decpt, sign are similar to those
of ecvt and fcvt; trailing zeros are suppressed from
@@ -2686,7 +2572,8 @@ kjs_dtoa
ULong x;
#endif
Bigint *b, *b1, *delta, *mlo = NULL, *mhi, *S;
- double d2, ds, eps;
+ U d, d2, eps;
+ double ds;
char *s, *s0;
#ifdef Honor_FLT_ROUNDS
int rounding;
@@ -2697,11 +2584,12 @@ kjs_dtoa
#ifndef MULTIPLE_THREADS
if (dtoa_result) {
- kjs_freedtoa(dtoa_result);
+ freedtoa(dtoa_result);
dtoa_result = 0;
}
#endif
+ dval(d) = dd;
if (word0(d) & Sign_bit) {
/* set sign for everything, including 0's and NaNs */
*sign = 1;
@@ -2966,7 +2854,8 @@ kjs_dtoa
if (dval(d) > 0.5 + dval(eps))
goto bump_up;
else if (dval(d) < 0.5 - dval(eps)) {
- while(*--s == '0');
+ while(*--s == '0')
+ ;
s++;
goto ret1;
}
@@ -3285,7 +3174,8 @@ kjs_dtoa
#ifdef Honor_FLT_ROUNDS
trimzeros:
#endif
- while(*--s == '0');
+ while(*--s == '0')
+ ;
s++;
}
ret:

View File

@ -1,21 +0,0 @@
diff -up kdelibs-3.5.10/kioslave/ftp/ftp.cc.orig kdelibs-3.5.10/kioslave/ftp/ftp.cc
--- kdelibs-3.5.10/kioslave/ftp/ftp.cc.orig 2009-02-25 13:18:13.000000000 +0100
+++ kdelibs-3.5.10/kioslave/ftp/ftp.cc 2009-02-25 13:34:13.000000000 +0100
@@ -876,7 +876,7 @@ int Ftp::ftpOpenPASVDataConnection()
// The usual answer is '227 Entering Passive Mode. (160,39,200,55,6,245)'
// but anonftpd gives '227 =160,39,200,55,6,245'
int i[6];
- char *start = strchr(ftpResponse(3), '(');
+ const char *start = strchr(ftpResponse(3), '(');
if ( !start )
start = strchr(ftpResponse(3), '=');
if ( !start ||
@@ -931,7 +931,7 @@ int Ftp::ftpOpenEPSVDataConnection()
return ERR_INTERNAL;
}
- char *start = strchr(ftpResponse(3), '|');
+ const char *start = strchr(ftpResponse(3), '|');
if ( !start || sscanf(start, "|||%d|", &portnum) != 1)
return ERR_INTERNAL;

View File

@ -1,21 +0,0 @@
diff -up kdelibs-3.5.10/kate/part/katebuffer.cpp.than kdelibs-3.5.10/kate/part/katebuffer.cpp
--- kdelibs-3.5.10/kate/part/katebuffer.cpp.than 2016-02-16 22:06:01.830197908 +0100
+++ kdelibs-3.5.10/kate/part/katebuffer.cpp 2016-02-16 23:33:15.810136589 +0100
@@ -42,6 +42,8 @@
#include <qcstring.h>
#include <qdatetime.h>
+#include <cmath>
+
/**
* loader block size, load 256 kb at once per default
* if file size is smaller, fall back to file size
@@ -917,7 +919,7 @@ void KateBuffer::updatePreviousNotEmptyL
} while (textLine->firstChar()==-1);
kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
QMemArray<uint> foldingList=textLine->foldingListArray();
- while ( (foldingList.size()>0) && ( abs(foldingList[foldingList.size()-2])==1)) {
+ while ( (foldingList.size()>0) && ( std::abs(foldingList[foldingList.size()-2])==1)) {
foldingList.resize(foldingList.size()-2,QGArray::SpeedOptim);
}
addIndentBasedFoldingInformation(foldingList,addindent,deindent);

View File

@ -1,12 +0,0 @@
diff -up kdelibs-3.5.10/kate/part/katebuffer.cpp~ kdelibs-3.5.10/kate/part/katebuffer.cpp
--- kdelibs-3.5.10/kate/part/katebuffer.cpp~ 2017-02-21 09:44:34.000000000 +0100
+++ kdelibs-3.5.10/kate/part/katebuffer.cpp 2017-02-21 09:48:20.132333343 +0100
@@ -919,7 +919,7 @@ void KateBuffer::updatePreviousNotEmptyL
} while (textLine->firstChar()==-1);
kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)<<endl;
QMemArray<uint> foldingList=textLine->foldingListArray();
- while ( (foldingList.size()>0) && ( std::abs(foldingList[foldingList.size()-2])==1)) {
+ while ( (foldingList.size()>0) && ( std::abs((long)foldingList[foldingList.size()-2])==1)) {
foldingList.resize(foldingList.size()-2,QGArray::SpeedOptim);
}
addIndentBasedFoldingInformation(foldingList,addindent,deindent);

View File

@ -1,31 +0,0 @@
diff -up kdelibs-3.5.10/kio/kio/kdirwatch.cpp.flock-redefinition kdelibs-3.5.10/kio/kio/kdirwatch.cpp
--- kdelibs-3.5.10/kio/kio/kdirwatch.cpp.flock-redefinition 2006-07-22 08:16:37.000000000 +0000
+++ kdelibs-3.5.10/kio/kio/kdirwatch.cpp 2011-05-11 14:48:07.000000000 +0000
@@ -67,26 +67,7 @@
#ifdef HAVE_INOTIFY
#include <unistd.h>
#include <fcntl.h>
-#include <sys/syscall.h>
-#include <linux/types.h>
-// Linux kernel headers are documented to not compile
-#define _S390_BITOPS_H
-#include <linux/inotify.h>
-
-static inline int inotify_init (void)
-{
- return syscall (__NR_inotify_init);
-}
-
-static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
-{
- return syscall (__NR_inotify_add_watch, fd, name, mask);
-}
-
-static inline int inotify_rm_watch (int fd, __u32 wd)
-{
- return syscall (__NR_inotify_rm_watch, fd, wd);
-}
+#include <sys/inotify.h>
#ifndef IN_ONLYDIR
#define IN_ONLYDIR 0x01000000

View File

@ -1,134 +0,0 @@
--- kdelibs-3.5.10/kabc/scripts/field.src.cpp.orig 2009-12-09 18:51:15.000000000 +0100
+++ kdelibs-3.5.10/kabc/scripts/field.src.cpp 2009-12-09 18:51:54.000000000 +0100
@@ -36,7 +36,7 @@
const QString &app = QString::null )
: mFieldId( fieldId ), mCategory( category ), mLabel( label ),
mKey( key ), mApp( app ) {}
-
+
enum FieldId
{
CustomField,
@@ -45,11 +45,11 @@
int fieldId() { return mFieldId; }
int category() { return mCategory; }
-
+
QString label() { return mLabel; }
QString key() { return mKey; }
QString app() { return mApp; }
-
+
private:
int mFieldId;
int mCategory;
@@ -184,6 +184,8 @@
return a.phoneNumber( PhoneNumber::Pager ).number();
case FieldImpl::HomeAddressStreet:
return a.address( Address::Home ).street();
+ case FieldImpl::HomeAddressPostOfficeBox:
+ return a.address( Address::Home ).postOfficeBox();
case FieldImpl::HomeAddressLocality:
return a.address( Address::Home ).locality();
case FieldImpl::HomeAddressRegion:
@@ -196,6 +198,8 @@
return a.address( Address::Home ).label();
case FieldImpl::BusinessAddressStreet:
return a.address( Address::Work ).street();
+ case FieldImpl::BusinessAddressPostOfficeBox:
+ return a.address( Address::Work ).postOfficeBox();
case FieldImpl::BusinessAddressLocality:
return a.address( Address::Work ).locality();
case FieldImpl::BusinessAddressRegion:
@@ -266,6 +270,13 @@
a.insertAddress( address );
return true;
}
+ case FieldImpl::HomeAddressPostOfficeBox:
+ {
+ KABC::Address address = a.address( Address::Home );
+ address.setPostOfficeBox( value );
+ a.insertAddress( address );
+ return true;
+ }
case FieldImpl::HomeAddressLocality:
{
KABC::Address address = a.address( Address::Home );
@@ -308,6 +319,13 @@
a.insertAddress( address );
return true;
}
+ case FieldImpl::BusinessAddressPostOfficeBox:
+ {
+ KABC::Address address = a.address( Address::Work );
+ address.setPostOfficeBox( value );
+ a.insertAddress( address );
+ return true;
+ }
case FieldImpl::BusinessAddressLocality:
{
KABC::Address address = a.address( Address::Work );
@@ -438,7 +456,7 @@
const Field::List &fields )
{
QValueList<int> fieldIds;
-
+
int custom = 0;
Field::List::ConstIterator it;
for( it = fields.begin(); it != fields.end(); ++it ) {
@@ -452,7 +470,7 @@
QString::number( custom++ ), customEntry );
}
}
-
+
cfg->writeEntry( identifier, fieldIds );
}
@@ -460,7 +478,7 @@
{
KConfig *cfg = KGlobal::config();
KConfigGroupSaver( cfg, "KABCFields" );
-
+
return restoreFields( cfg, identifier );
}
@@ -485,7 +503,7 @@
}
fields.append( new Field( f ) );
}
-
+
return fields;
}
@@ -496,7 +514,7 @@
if ( !sameId ) return false;
if ( mImpl->fieldId() != FieldImpl::CustomField ) return true;
-
+
return mImpl->key() == field->mImpl->key();
}
--- kdelibs-3.5.10/kabc/scripts/entrylist.orig 2009-12-09 18:48:40.000000000 +0100
+++ kdelibs-3.5.10/kabc/scripts/entrylist 2009-12-09 18:50:42.000000000 +0100
@@ -29,6 +29,7 @@
#Address address
LF,home address street,,QString,homeAddressStreet,Address|Personal
+LF,home address post office box,,QString,homeAddressPostOfficeBox,Address|Personal
LF,home address city,,QString,homeAddressLocality,Address|Personal
LF,home address state,,QString,homeAddressRegion,Address|Personal
LF,home address zip code,,QString,homeAddressPostalCode,Address|Personal
@@ -36,6 +37,7 @@
LF,home address label,,QString,homeAddressLabel,Address|Personal
LF,business address street,,QString,businessAddressStreet,Address|Organization
+LF,business address post office box,,QString,businessAddressPostOfficeBox,Address|Organization
LF,business address city,,QString,businessAddressLocality,Address|Organization
LF,business address state,,QString,businessAddressRegion,Address|Organization
LF,business address zip code,,QString,businessAddressPostalCode,Address|Organization

View File

@ -1,21 +0,0 @@
diff -up kdelibs-3.5.10/kdecore/kde-config.cpp.in.kde-config_kde-version kdelibs-3.5.10/kdecore/kde-config.cpp.in
--- kdelibs-3.5.10/kdecore/kde-config.cpp.in.kde-config_kde-version 2005-09-10 03:27:12.000000000 -0500
+++ kdelibs-3.5.10/kdecore/kde-config.cpp.in 2010-01-29 10:30:16.846715263 -0600
@@ -20,7 +20,7 @@ static KCmdLineOptions options[] =
{ "exec-prefix", I18N_NOOP("Compiled in exec_prefix for KDE libraries"), 0 },
{ "libsuffix", I18N_NOOP("Compiled in library path suffix"), 0 },
{ "localprefix", I18N_NOOP("Prefix in $HOME used to write files"), 0},
- { "version", I18N_NOOP("Compiled in version string for KDE libraries"), 0 },
+ { "kde-version", I18N_NOOP("Compiled in version string for KDE libraries"), 0 },
{ "types", I18N_NOOP("Available KDE resource types"), 0 },
{ "path type", I18N_NOOP("Search path for resource type"), 0 },
{ "userpath type", I18N_NOOP("User path: desktop|autostart|trash|document"), 0 },
@@ -154,7 +154,7 @@ int main(int argc, char **argv)
return 0;
}
- if (args->isSet("version"))
+ if (args->isSet("kde-version"))
{
printf("%s\n", KDE_VERSION_STRING);
return 0;

View File

@ -1,47 +0,0 @@
--- kdelibs-3.5.10/kio/kio/kzip.cpp.orig 2009-12-09 18:42:47.000000000 +0100
+++ kdelibs-3.5.10/kio/kio/kzip.cpp 2009-12-09 18:45:43.000000000 +0100
@@ -1051,6 +1051,20 @@
return true;
}
+bool KZip::writeDir(const QString& name, const QString& user, const QString& group)
+{
+ // Zip files have no explicit directories, they are implicitly created during extraction time
+ // when file entries have paths in them.
+ // However, to support empty directories, we must create a dummy file entry which ends with '/'.
+ QString dirName = name;
+ if (!name.endsWith("/"))
+ dirName = dirName.append('/');
+
+ mode_t perm = 040755;
+ time_t the_time = time(0);
+ return writeFile(dirName, user, group, 0, perm, the_time, the_time, the_time, 0);
+}
+
// Doesn't need to be reimplemented anymore. Remove for KDE-4.0
bool KZip::writeFile( const QString& name, const QString& user, const QString& group, uint size, const char* data )
{
@@ -1114,7 +1128,7 @@
}
// delete entries in the filelist with the same filename as the one we want
- // to save, so that we don´t have duplicate file entries when viewing the zip
+ // to save, so that we don�t have duplicate file entries when viewing the zip
// with konqi...
// CAUTION: the old file itself is still in the zip and won't be removed !!!
QPtrListIterator<KZipFileEntry> it( d->m_fileList );
diff -up kdelibs-3.5.10/kio/kio/kzip.h.orig kdelibs-3.5.10/kio/kio/kzip.h
--- kdelibs-3.5.10/kio/kio/kzip.h.orig 2009-12-09 19:35:42.000000000 +0100
+++ kdelibs-3.5.10/kio/kio/kzip.h 2009-12-09 19:35:48.000000000 +0100
@@ -191,10 +191,7 @@ protected:
/// Closes the archive
virtual bool closeArchive();
- /**
- * @internal Not needed for zip
- */
- virtual bool writeDir( const QString& name, const QString& user, const QString& group) { Q_UNUSED(name); Q_UNUSED(user); Q_UNUSED(group); return true; }
+ virtual bool writeDir(const QString& name, const QString& user, const QString& group);
// TODO(BIC) uncomment and make virtual for KDE 4.
// bool writeDir( const QString& name, const QString& user, const QString& group,
// mode_t perm, time_t atime, time_t mtime, time_t ctime );

View File

@ -1,45 +0,0 @@
Index: xmlhttprequest.cpp
===================================================================
--- khtml/ecma/xmlhttprequest.cpp (revision 954808)
+++ khtml/ecma/xmlhttprequest.cpp (working copy)
@@ -342,17 +342,17 @@
{
aborted = false;
+ const QString protocol = url.protocol().lower();
+ // Abandon the request when the protocol is other than "http",
+ // instead of blindly doing a KIO::get on other protocols like file:/.
+ if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
+ {
+ abort();
+ return;
+ }
+
if (method == "post") {
- QString protocol = url.protocol().lower();
- // Abondon the request when the protocol is other than "http",
- // instead of blindly changing it to a "get" request.
- if (!protocol.startsWith("http") && !protocol.startsWith("webdav"))
- {
- abort();
- return;
- }
-
// FIXME: determine post encoding correctly by looking in headers
// for charset.
QByteArray buf;
@@ -763,11 +763,11 @@
if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
DOM::Node docNode = static_cast<KJS::DOMDocument *>(obj.imp())->toNode();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl *>(docNode.handle());
-
+
try {
body = doc->toString().string();
// FIXME: also need to set content type, including encoding!
-
+
} catch(DOM::DOMException& e) {
Object err = Error::create(exec, GeneralError, "Exception serializing document");
exec->setException(err);

File diff suppressed because it is too large Load Diff

View File

@ -1,180 +0,0 @@
diff -up kdelibs-3.5.10/kio/kssl/kopenssl.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/kopenssl.cc
--- kdelibs-3.5.10/kio/kssl/kopenssl.cc.ossl-1.x 2009-09-04 23:10:53.000000000 +0200
+++ kdelibs-3.5.10/kio/kssl/kopenssl.cc 2009-09-04 23:10:53.000000000 +0200
@@ -96,9 +96,14 @@ static int (*K_BIO_write) (BIO *b, cons
static int (*K_PEM_ASN1_write_bio) (int (*)(),const char *,BIO *,char *,
const EVP_CIPHER *,unsigned char *,int ,
pem_password_cb *, void *) = 0L;
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+static int (*K_ASN1_item_i2d_fp)(ASN1_ITEM *,FILE *,unsigned char *) = 0L;
+static ASN1_ITEM *K_NETSCAPE_X509_it = 0L;
+#else
static ASN1_METHOD* (*K_X509_asn1_meth) (void) = 0L;
static int (*K_ASN1_i2d_fp)(int (*)(),FILE *,unsigned char *) = 0L;
static int (*K_i2d_ASN1_HEADER)(ASN1_HEADER *, unsigned char **) = 0L;
+#endif
static int (*K_X509_print_fp) (FILE *, X509*) = 0L;
static int (*K_i2d_PKCS12) (PKCS12*, unsigned char**) = 0L;
static int (*K_i2d_PKCS12_fp) (FILE *, PKCS12*) = 0L;
@@ -430,9 +435,14 @@ KConfig *cfg;
K_BIO_ctrl = (long (*) (BIO *,int,long,void *)) _cryptoLib->symbol("BIO_ctrl");
K_BIO_write = (int (*) (BIO *b, const void *data, int len)) _cryptoLib->symbol("BIO_write");
K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *,BIO*, char*, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) _cryptoLib->symbol("PEM_ASN1_write_bio");
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_item_i2d_fp");
+ K_NETSCAPE_X509_it = (ASN1_ITEM *) _cryptoLib->symbol("NETSCAPE_X509_it");
+#else
K_X509_asn1_meth = (ASN1_METHOD* (*)(void)) _cryptoLib->symbol("X509_asn1_meth");
K_ASN1_i2d_fp = (int (*)(int (*)(), FILE*, unsigned char *)) _cryptoLib->symbol("ASN1_i2d_fp");
K_i2d_ASN1_HEADER = (int (*)(ASN1_HEADER *, unsigned char **)) _cryptoLib->symbol("i2d_ASN1_HEADER");
+#endif
K_X509_print_fp = (int (*)(FILE*, X509*)) _cryptoLib->symbol("X509_print_fp");
K_i2d_PKCS12 = (int (*)(PKCS12*, unsigned char**)) _cryptoLib->symbol("i2d_PKCS12");
K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12*)) _cryptoLib->symbol("i2d_PKCS12_fp");
@@ -594,7 +604,7 @@ KConfig *cfg;
K_SSL_set_session = (int (*)(SSL*,SSL_SESSION*)) _sslLib->symbol("SSL_set_session");
K_d2i_SSL_SESSION = (SSL_SESSION* (*)(SSL_SESSION**,unsigned char**, long)) _sslLib->symbol("d2i_SSL_SESSION");
K_i2d_SSL_SESSION = (int (*)(SSL_SESSION*,unsigned char**)) _sslLib->symbol("i2d_SSL_SESSION");
- K_SSL_get_ciphers = (STACK *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
+ K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) *(*)(const SSL*)) _sslLib->symbol("SSL_get_ciphers");
#endif
@@ -982,7 +992,13 @@ int KOpenSSLProxy::PEM_write_bio_X509(BI
else return -1;
}
-
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+int KOpenSSLProxy::ASN1_i2d_fp(FILE *out,unsigned char *x) {
+ if (K_ASN1_item_i2d_fp && K_NETSCAPE_X509_it)
+ return (K_ASN1_item_i2d_fp)(K_NETSCAPE_X509_it, out, x);
+ else return -1;
+}
+#else
ASN1_METHOD *KOpenSSLProxy::X509_asn1_meth(void) {
if (K_X509_asn1_meth) return (K_X509_asn1_meth)();
else return 0L;
@@ -994,7 +1010,7 @@ int KOpenSSLProxy::ASN1_i2d_fp(FILE *out
return (K_ASN1_i2d_fp)((int (*)())K_i2d_ASN1_HEADER, out, x);
else return -1;
}
-
+#endif
int KOpenSSLProxy::X509_print(FILE *fp, X509 *x) {
if (K_X509_print_fp) return (K_X509_print_fp)(fp, x);
diff -up kdelibs-3.5.10/kio/kssl/kopenssl.h.ossl-1.x kdelibs-3.5.10/kio/kssl/kopenssl.h
--- kdelibs-3.5.10/kio/kssl/kopenssl.h.ossl-1.x 2006-07-22 10:16:39.000000000 +0200
+++ kdelibs-3.5.10/kio/kssl/kopenssl.h 2009-09-04 23:10:53.000000000 +0200
@@ -48,6 +48,9 @@ class KOpenSSLProxyPrivate;
#include <openssl/stack.h>
#include <openssl/bn.h>
#undef crypt
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#define STACK _STACK
+#endif
#endif
#include <kstaticdeleter.h>
@@ -446,12 +449,12 @@ public:
*/
int PEM_write_bio_X509(BIO *bp, X509 *x);
-
+#if OPENSSL_VERSION_NUMBER < 0x10000000L
/*
* X509_asn1_meth - used for netscape output
*/
ASN1_METHOD *X509_asn1_meth();
-
+#endif
/*
* ASN1_i2d_fp - used for netscape output
@@ -531,6 +534,9 @@ public:
*/
void sk_free(STACK *s);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ void sk_free(void *s) { return sk_free(reinterpret_cast<STACK*>(s)); }
+#endif
/*
* Number of elements in the stack
@@ -543,6 +549,9 @@ public:
*/
char *sk_value(STACK *s, int n);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ char *sk_value(void *s, int n) { return sk_value(reinterpret_cast<STACK*>(s), n); }
+#endif
/*
* Create a new stack
@@ -555,6 +564,9 @@ public:
*/
int sk_push(STACK *s, char *d);
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ int sk_push(void *s, void *d) { return sk_push(reinterpret_cast<STACK*>(s), reinterpret_cast<char*>(d)); }
+#endif
/*
* Duplicate the stack
diff -up kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc
--- kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc.ossl-1.x 2005-10-10 17:05:44.000000000 +0200
+++ kdelibs-3.5.10/kio/kssl/ksmimecrypto.cc 2009-09-04 23:10:53.000000000 +0200
@@ -87,7 +87,7 @@ KSMIMECryptoPrivate::KSMIMECryptoPrivate
STACK_OF(X509) *KSMIMECryptoPrivate::certsToX509(QPtrList<KSSLCertificate> &certs) {
- STACK_OF(X509) *x509 = sk_new(NULL);
+ STACK_OF(X509) *x509 = reinterpret_cast<STACK_OF(X509)*>(sk_new(NULL));
KSSLCertificate *cert = certs.first();
while(cert) {
sk_X509_push(x509, cert->getCert());
diff -up kdelibs-3.5.10/kio/kssl/ksslcertificate.cc.ossl-1.x kdelibs-3.5.10/kio/kssl/ksslcertificate.cc
--- kdelibs-3.5.10/kio/kssl/ksslcertificate.cc.ossl-1.x 2006-01-19 18:06:12.000000000 +0100
+++ kdelibs-3.5.10/kio/kssl/ksslcertificate.cc 2009-09-04 23:10:53.000000000 +0200
@@ -1003,17 +1003,31 @@ return qba;
QByteArray KSSLCertificate::toNetscape() {
QByteArray qba;
#ifdef KSSL_HAVE_SSL
-ASN1_HEADER ah;
-ASN1_OCTET_STRING os;
-KTempFile ktf;
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ NETSCAPE_X509 nx;
+ ASN1_OCTET_STRING hdr;
+#else
+ ASN1_HEADER ah;
+ ASN1_OCTET_STRING os;
+#endif
+ KTempFile ktf;
- os.data = (unsigned char *)NETSCAPE_CERT_HDR;
- os.length = strlen(NETSCAPE_CERT_HDR);
- ah.header = &os;
- ah.data = (char *)getCert();
- ah.meth = d->kossl->X509_asn1_meth();
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ hdr.data = (unsigned char *)NETSCAPE_CERT_HDR;
+ hdr.length = strlen(NETSCAPE_CERT_HDR);
+ nx.header = &hdr;
+ nx.cert = getCert();
+
+ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&nx);
+#else
+ os.data = (unsigned char *)NETSCAPE_CERT_HDR;
+ os.length = strlen(NETSCAPE_CERT_HDR);
+ ah.header = &os;
+ ah.data = (char *)getCert();
+ ah.meth = d->kossl->X509_asn1_meth();
- d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
+ d->kossl->ASN1_i2d_fp(ktf.fstream(),(unsigned char *)&ah);
+#endif
ktf.close();

View File

@ -1,24 +0,0 @@
diff -up kdelibs-3.5.10/kate/part/katehighlight.cpp.gcc_ftbfs kdelibs-3.5.10/kate/part/katehighlight.cpp
--- kdelibs-3.5.10/kate/part/katehighlight.cpp.gcc_ftbfs 2007-05-14 02:52:27.000000000 -0500
+++ kdelibs-3.5.10/kate/part/katehighlight.cpp 2010-11-18 11:12:45.453403959 -0600
@@ -3225,7 +3225,7 @@ void KateHlManager::getDefaults(uint sch
list.append(charAttribute);
KateAttribute* string = new KateAttribute();
- string->setTextColor(QColor::QColor("#D00"));
+ string->setTextColor(QColor("#D00"));
string->setSelectedTextColor(Qt::red);
list.append(string);
@@ -3242,9 +3242,9 @@ void KateHlManager::getDefaults(uint sch
KateAttribute* alert = new KateAttribute();
alert->setTextColor(Qt::black);
- alert->setSelectedTextColor( QColor::QColor("#FCC") );
+ alert->setSelectedTextColor( QColor("#FCC") );
alert->setBold(true);
- alert->setBGColor( QColor::QColor("#FCC") );
+ alert->setBGColor( QColor("#FCC") );
list.append(alert);
KateAttribute* functionAttribute = new KateAttribute();

View File

@ -1,12 +0,0 @@
diff -up kdelibs-3.5.10/kdecore/svgicons/ksvgiconpainter.cpp.than kdelibs-3.5.10/kdecore/svgicons/ksvgiconpainter.cpp
--- kdelibs-3.5.10/kdecore/svgicons/ksvgiconpainter.cpp.than 2016-09-28 16:58:47.881217306 +0200
+++ kdelibs-3.5.10/kdecore/svgicons/ksvgiconpainter.cpp 2016-09-28 16:59:20.518989958 +0200
@@ -2208,7 +2208,7 @@ void KSVGIconPainter::drawPath(const QSt
break;
}
- if(*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9'))
+ if(*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9') || *ptr == '.')
{
// there are still coords in this command
if(command == 'M')

View File

@ -1,20 +0,0 @@
--- kdelibs-3.5.4/kjs/collector.cpp.CVE-2009-1687 2009-06-17 15:07:33.000000000 +0200
+++ kdelibs-3.5.4/kjs/collector.cpp 2009-06-20 00:42:48.000000000 +0200
@@ -23,6 +23,7 @@
#include "value.h"
#include "internal.h"
+#include <limits.h>
#ifndef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
@@ -119,6 +120,9 @@
// didn't find one, need to allocate a new block
if (heap.usedBlocks == heap.numBlocks) {
+ static const size_t maxNumBlocks = ULONG_MAX / sizeof(CollectorBlock*) / GROWTH_FACTOR;
+ if (heap.numBlocks > maxNumBlocks)
+ return 0L;
heap.numBlocks = MAX(MIN_ARRAY_SIZE, heap.numBlocks * GROWTH_FACTOR);
heap.blocks = (CollectorBlock **)realloc(heap.blocks, heap.numBlocks * sizeof(CollectorBlock *));
}

View File

@ -1,545 +0,0 @@
--- kdelibs-3.5.4/khtml/html/RefPtr.h.CVE-2009-1690 2009-06-17 14:19:00.000000000 +0200
+++ kdelibs-3.5.4/khtml/html/RefPtr.h 2009-06-17 14:19:00.000000000 +0200
@@ -0,0 +1,202 @@
+// -*- mode: c++; c-basic-offset: 4 -*-
+/*
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef WTF_RefPtr_h
+#define WTF_RefPtr_h
+
+#include <algorithm>
+#include "AlwaysInline.h"
+
+namespace WTF {
+
+ enum PlacementNewAdoptType { PlacementNewAdopt };
+
+ template <typename T> class PassRefPtr;
+
+ enum HashTableDeletedValueType { HashTableDeletedValue };
+
+ template <typename T> class RefPtr {
+ public:
+ RefPtr() : m_ptr(0) { }
+ RefPtr(T* ptr) : m_ptr(ptr) { if (ptr) ptr->ref(); }
+ RefPtr(const RefPtr& o) : m_ptr(o.m_ptr) { if (T* ptr = m_ptr) ptr->ref(); }
+ // see comment in PassRefPtr.h for why this takes const reference
+ template <typename U> RefPtr(const PassRefPtr<U>&);
+
+ // Special constructor for cases where we overwrite an object in place.
+ RefPtr(PlacementNewAdoptType) { }
+
+ // Hash table deleted values, which are only constructed and never copied or destroyed.
+ RefPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
+ bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
+
+ ~RefPtr() { if (T* ptr = m_ptr) ptr->deref(); }
+
+ template <typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { if (T* ptr = m_ptr) ptr->ref(); }
+
+ T* get() const { return m_ptr; }
+
+ void clear() { if (T* ptr = m_ptr) ptr->deref(); m_ptr = 0; }
+ PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = 0; return tmp; }
+
+ T& operator*() const { return *m_ptr; }
+ ALWAYS_INLINE T* operator->() const { return m_ptr; }
+
+ bool operator!() const { return !m_ptr; }
+
+ // This conversion operator allows implicit conversion to bool but not to other integer types.
+ typedef T* RefPtr::*UnspecifiedBoolType;
+ operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; }
+
+ RefPtr& operator=(const RefPtr&);
+ RefPtr& operator=(T*);
+ RefPtr& operator=(const PassRefPtr<T>&);
+ template <typename U> RefPtr& operator=(const RefPtr<U>&);
+ template <typename U> RefPtr& operator=(const PassRefPtr<U>&);
+
+ void swap(RefPtr&);
+
+ private:
+ static T* hashTableDeletedValue() { return reinterpret_cast<T*>(-1); }
+
+ T* m_ptr;
+ };
+
+ template <typename T> template <typename U> inline RefPtr<T>::RefPtr(const PassRefPtr<U>& o)
+ : m_ptr(o.releaseRef())
+ {
+ }
+
+ template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<T>& o)
+ {
+ T* optr = o.get();
+ if (optr)
+ optr->ref();
+ T* ptr = m_ptr;
+ m_ptr = optr;
+ if (ptr)
+ ptr->deref();
+ return *this;
+ }
+
+ template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const RefPtr<U>& o)
+ {
+ T* optr = o.get();
+ if (optr)
+ optr->ref();
+ T* ptr = m_ptr;
+ m_ptr = optr;
+ if (ptr)
+ ptr->deref();
+ return *this;
+ }
+
+ template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr)
+ {
+ if (optr)
+ optr->ref();
+ T* ptr = m_ptr;
+ m_ptr = optr;
+ if (ptr)
+ ptr->deref();
+ return *this;
+ }
+
+ template <typename T> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<T>& o)
+ {
+ T* ptr = m_ptr;
+ m_ptr = o.releaseRef();
+ if (ptr)
+ ptr->deref();
+ return *this;
+ }
+
+ template <typename T> template <typename U> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<U>& o)
+ {
+ T* ptr = m_ptr;
+ m_ptr = o.releaseRef();
+ if (ptr)
+ ptr->deref();
+ return *this;
+ }
+
+ template <class T> inline void RefPtr<T>::swap(RefPtr<T>& o)
+ {
+ std::swap(m_ptr, o.m_ptr);
+ }
+
+ template <class T> inline void swap(RefPtr<T>& a, RefPtr<T>& b)
+ {
+ a.swap(b);
+ }
+
+ template <typename T, typename U> inline bool operator==(const RefPtr<T>& a, const RefPtr<U>& b)
+ {
+ return a.get() == b.get();
+ }
+
+ template <typename T, typename U> inline bool operator==(const RefPtr<T>& a, U* b)
+ {
+ return a.get() == b;
+ }
+
+ template <typename T, typename U> inline bool operator==(T* a, const RefPtr<U>& b)
+ {
+ return a == b.get();
+ }
+
+ template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, const RefPtr<U>& b)
+ {
+ return a.get() != b.get();
+ }
+
+ template <typename T, typename U> inline bool operator!=(const RefPtr<T>& a, U* b)
+ {
+ return a.get() != b;
+ }
+
+ template <typename T, typename U> inline bool operator!=(T* a, const RefPtr<U>& b)
+ {
+ return a != b.get();
+ }
+
+ template <typename T, typename U> inline RefPtr<T> static_pointer_cast(const RefPtr<U>& p)
+ {
+ return RefPtr<T>(static_cast<T*>(p.get()));
+ }
+
+ template <typename T, typename U> inline RefPtr<T> const_pointer_cast(const RefPtr<U>& p)
+ {
+ return RefPtr<T>(const_cast<T*>(p.get()));
+ }
+
+ template <typename T> inline T* getPtr(const RefPtr<T>& p)
+ {
+ return p.get();
+ }
+
+} // namespace WTF
+
+using WTF::RefPtr;
+using WTF::static_pointer_cast;
+using WTF::const_pointer_cast;
+
+#endif // WTF_RefPtr_h
--- kdelibs-3.5.4/khtml/html/htmlparser.cpp.CVE-2009-1690 2006-07-22 10:16:43.000000000 +0200
+++ kdelibs-3.5.4/khtml/html/htmlparser.cpp 2009-06-17 11:51:15.000000000 +0200
@@ -199,7 +199,6 @@
form = 0;
map = 0;
- head = 0;
end = false;
isindex = 0;
@@ -616,8 +615,7 @@
case ID_BASE:
if(!head) {
head = new HTMLHeadElementImpl(document);
- e = head;
- insertNode(e);
+ insertNode(head.get());
handled = true;
}
break;
@@ -839,7 +837,7 @@
case ID_HEAD:
if(!head && current->id() == ID_HTML) {
head = new HTMLHeadElementImpl(document);
- n = head;
+ n = head.get();
}
break;
case ID_BODY:
@@ -1679,12 +1677,12 @@
head = new HTMLHeadElementImpl(document);
HTMLElementImpl *body = doc()->body();
int exceptioncode = 0;
- doc()->firstChild()->insertBefore(head, body, exceptioncode);
+ doc()->firstChild()->insertBefore(head.get(), body, exceptioncode);
if ( exceptioncode ) {
#ifdef PARSER_DEBUG
kdDebug( 6035 ) << "creation of head failed!!!!" << endl;
#endif
- delete head;
+ delete head.get();
head = 0;
}
}
--- kdelibs-3.5.4/khtml/html/Platform.h.CVE-2009-1690 2009-06-17 14:19:07.000000000 +0200
+++ kdelibs-3.5.4/khtml/html/Platform.h 2009-06-17 14:19:07.000000000 +0200
@@ -0,0 +1,218 @@
+/* -*- mode: c++; c-basic-offset: 4 -*- */
+/*
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WTF_Platform_h
+#define WTF_Platform_h
+
+/* Force KDE build here in our tree... */
+#ifndef BUILDING_KDE__
+#define BUILDING_KDE__ 1
+#endif
+
+/* PLATFORM handles OS, operating environment, graphics API, and CPU */
+#define PLATFORM(WTF_FEATURE) (defined( WTF_PLATFORM_##WTF_FEATURE ) && WTF_PLATFORM_##WTF_FEATURE)
+#define COMPILER(WTF_FEATURE) (defined( WTF_COMPILER_##WTF_FEATURE ) && WTF_COMPILER_##WTF_FEATURE)
+#define HAVE(WTF_FEATURE) (defined( HAVE_##WTF_FEATURE ) && HAVE_##WTF_FEATURE)
+#define USE(WTF_FEATURE) (defined( WTF_USE_##WTF_FEATURE ) && WTF_USE_##WTF_FEATURE)
+#define ENABLE(WTF_FEATURE) (defined( ENABLE_##WTF_FEATURE ) && ENABLE_##WTF_FEATURE)
+
+/* Operating systems - low-level dependencies */
+
+/* PLATFORM(DARWIN) */
+/* Operating system level dependencies for Mac OS X / Darwin that should */
+/* be used regardless of operating environment */
+#ifdef __APPLE__
+#define WTF_PLATFORM_DARWIN 1
+#endif
+
+/* PLATFORM(WIN_OS) */
+/* Operating system level dependencies for Windows that should be used */
+/* regardless of operating environment */
+#if defined(WIN32) || defined(_WIN32)
+#define WTF_PLATFORM_WIN_OS 1
+#endif
+
+/* PLATFORM(UNIX) */
+/* Operating system level dependencies for Unix-like systems that */
+/* should be used regardless of operating environment */
+/* (includes PLATFORM(DARWIN)) */
+#if defined(__APPLE__) \
+ || defined(unix) \
+ || defined(__unix) \
+ || defined(__unix__) \
+ || defined (__NetBSD__) \
+ || defined(_AIX)
+#define WTF_PLATFORM_UNIX 1
+#endif
+
+/* PLATFORM(SOLARIS_OS) */
+/* Operating system level dependencies for Sun (Open)Solaris 10. */
+/* Studio 12 on Solaris defines __SunOS; gcc defines __sun__; */
+/* Both compilers define __sun and sun. */
+#if defined(__sun) || defined(sun)
+#define WTF_PLATFORM_SOLARIS_OS 1
+#endif
+
+/* Operating environments */
+
+/* I made the BUILDING_KDE__ macro up for the KDE build system to define */
+
+/* PLATFORM(KDE) */
+/* PLATFORM(MAC) */
+/* PLATFORM(WIN) */
+#if BUILDING_KDE__
+#define WTF_PLATFORM_KDE 1
+#elif PLATFORM(DARWIN)
+#define WTF_PLATFORM_MAC 1
+#elif PLATFORM(WIN_OS)
+#define WTF_PLATFORM_WIN 1
+#endif
+#if defined(BUILDING_GDK__)
+#define WTF_PLATFORM_GDK 1
+#endif
+
+
+/* CPU */
+
+/* PLATFORM(PPC) */
+#if defined(__ppc__) \
+ || defined(__PPC__) \
+ || defined(__powerpc__) \
+ || defined(__powerpc) \
+ || defined(__POWERPC__) \
+ || defined(_M_PPC) \
+ || defined(__PPC)
+#define WTF_PLATFORM_PPC 1
+#define WTF_PLATFORM_BIG_ENDIAN 1
+#endif
+
+/* PLATFORM(PPC64) */
+#if defined(__ppc64__) \
+ || defined(__PPC64__)
+#define WTF_PLATFORM_PPC64 1
+#define WTF_PLATFORM_BIG_ENDIAN 1
+#endif
+
+#if defined(arm)
+#define WTF_PLATFORM_ARM 1
+#if defined(__ARMEB__)
+#define WTF_PLATFORM_BIG_ENDIAN 1
+#elif !defined(__ARM_EABI__) && !defined(__ARMEB__)
+#define WTF_PLATFORM_MIDDLE_ENDIAN 1
+#endif
+#if !defined(__ARM_EABI__)
+#define WTF_PLATFORM_FORCE_PACK 1
+#endif
+#endif
+
+/* PLATFORM(X86) */
+#if defined(__i386__) \
+ || defined(i386) \
+ || defined(_M_IX86) \
+ || defined(_X86_) \
+ || defined(__THW_INTEL)
+#define WTF_PLATFORM_X86 1
+#endif
+
+/* PLATFORM(X86_64) */
+#if defined(__x86_64__) \
+ || defined(__ia64__)
+#define WTF_PLATFORM_X86_64 1
+#endif
+
+/* PLATFORM(SPARC) */
+#if defined(sparc)
+#define WTF_PLATFORM_SPARC 1
+#endif
+
+/* Compiler */
+
+/* COMPILER(CWP) */
+#if defined(__MWERKS__)
+#define WTF_COMPILER_CWP 1
+#endif
+
+/* COMPILER(MSVC) */
+#if defined(_MSC_VER)
+#define WTF_COMPILER_MSVC 1
+#endif
+
+/* COMPILER(GCC) */
+#if defined(__GNUC__)
+#define WTF_COMPILER_GCC 1
+#endif
+
+/* COMPILER(SUNPRO) */
+#if defined(__SUNPRO_CC)
+#define WTF_COMPILER_SUNPRO 1
+#endif
+
+/* COMPILER(BORLAND) */
+/* not really fully supported - is this relevant any more? */
+#if defined(__BORLANDC__)
+#define WTF_COMPILER_BORLAND 1
+#endif
+
+/* COMPILER(CYGWIN) */
+/* not really fully supported - is this relevant any more? */
+#if defined(__CYGWIN__)
+#define WTF_COMPILER_CYGWIN 1
+#endif
+
+/* multiple threads only supported on Mac for now */
+#if PLATFORM(MAC)
+#ifndef WTF_USE_MULTIPLE_THREADS
+#define WTF_USE_MULTIPLE_THREADS 1
+#endif
+#ifndef WTF_USE_BINDINGS
+#define WTF_USE_BINDINGS 1
+#endif
+#endif
+
+/* for Unicode, KDE uses Qt, everything else uses ICU */
+#if PLATFORM(KDE) || PLATFORM(QT)
+#define WTF_USE_QT4_UNICODE 1
+#elif PLATFORM(SYMBIAN)
+#define WTF_USE_SYMBIAN_UNICODE 1
+#else
+#define WTF_USE_ICU_UNICODE 1
+#endif
+
+#if PLATFORM(MAC)
+#define WTF_PLATFORM_CF 1
+#endif
+
+#if PLATFORM(WIN)
+#define WTF_USE_WININET 1
+#endif
+
+#if PLATFORM(GDK)
+#define WTF_USE_CURL 1
+#endif
+
+/* ENABLE macro defaults */
+
+#endif /* WTF_Platform_h */
--- kdelibs-3.5.4/khtml/html/AlwaysInline.h.CVE-2009-1690 2009-06-17 14:18:52.000000000 +0200
+++ kdelibs-3.5.4/khtml/html/AlwaysInline.h 2009-06-17 13:56:36.000000000 +0200
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2005, 2007 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "html/Platform.h"
+
+
+#ifndef ALWAYS_INLINE
+#if COMPILER(GCC) && defined(NDEBUG) && __GNUC__ > 3
+#define ALWAYS_INLINE inline __attribute__ ((__always_inline__))
+#elif COMPILER(MSVC) && defined(NDEBUG)
+#define ALWAYS_INLINE __forceinline
+#else
+#define ALWAYS_INLINE inline
+#endif
+#endif
+
+#ifndef ALWAYS_INLINE_INTO
+#if COMPILER(GCC) && defined(NDEBUG) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || __GNUC__ > 4)
+#define ALWAYS_INLINE_INTO __attribute__ ((__flatten__))
+#else
+#define ALWAYS_INLINE_INTO
+#endif
+#endif
+
+
+#ifndef NEVER_INLINE
+#if COMPILER(GCC) && __GNUC__ > 3
+#define NEVER_INLINE __attribute__ ((__noinline__))
+#else
+#define NEVER_INLINE
+#endif
+#endif
--- kdelibs-3.5.4/khtml/html/htmlparser.h.CVE-2009-1690 2005-10-10 17:06:04.000000000 +0200
+++ kdelibs-3.5.4/khtml/html/htmlparser.h 2009-06-17 14:42:27.000000000 +0200
@@ -38,10 +38,10 @@
#include <qdatetime.h>
#endif
-
#include "dom/dom_string.h"
#include "xml/dom_nodeimpl.h"
#include "html/html_documentimpl.h"
+#include "html/RefPtr.h"
class KHTMLView;
class HTMLStackElem;
@@ -148,7 +148,7 @@
/*
* the head element. Needed for crappy html which defines <base> after </head>
*/
- DOM::HTMLHeadElementImpl *head;
+ RefPtr<DOM::HTMLHeadElementImpl> head;
/*
* a possible <isindex> element in the head. Compatibility hack for

View File

@ -0,0 +1,169 @@
kdecore/Makefile.am | 2 +
kdecore/klibloader.cpp | 86 +++++++++++++++++++++++++++----------------------
kdecore/klibloader.h | 2 -
kinit/kinit.cpp | 8 +---
4 files changed, 55 insertions(+), 43 deletions(-)
--- kdelibs-3.5.5/kdecore/Makefile.am.orig 2006-10-01 19:33:38.000000000 +0200
+++ kdelibs-3.5.5/kdecore/Makefile.am 2007-01-05 00:17:27.235678750 +0100
@@ -115,8 +115,10 @@
kuser.cpp kconfigskeleton.cpp kconfigdialogmanager.cpp klockfile.cpp \
kqiodevicegzip_p.cpp ktimezones.cpp
+CXXFLAGS += -fexceptions
libkdecore_la_LDFLAGS = $(QT_LDFLAGS) $(KDE_RPATH) $(KDE_MT_LDFLAGS) $(X_LDFLAGS) $(USER_LDFLAGS) -version-info 6:0:2 -no-undefined
libkdecore_la_LIBADD = malloc/libklmalloc.la network/libkdecorenetwork.la $(SVGICON_LIB) ../dcop/libDCOP.la ../libltdl/libltdlc.la $(LIB_XEXT) $(LIBRESOLV) $(LIBUTIL) $(LIBART_LIBS) $(LIB_IDN) ../kdefx/libkdefx.la
+libkdecore_la_LIBADD += -lboost_filesystem -lboost_regex
libkdecore_la_NMCHECK = $(srcdir)/libkdecore.nmcheck
libkdecore_la_NMCHECKWEAK = $(srcdir)/libkdecore_weak.nmcheck $(srcdir)/libqt-mt_weak.nmcheck \
$(top_srcdir)/dcop/libDCOP_weak.nmcheck $(top_srcdir)/kdecore/standard_weak.nmcheck
--- kdelibs-3.5.5/kdecore/klibloader.h.orig 2005-10-10 17:06:03.000000000 +0200
+++ kdelibs-3.5.5/kdecore/klibloader.h 2007-01-04 23:19:39.868039250 +0100
@@ -270,7 +270,7 @@
* wants to open modules.
* @param name of the library. If it is not a path, the function searches in
* the "module" and "lib" resources. If there is no extension,
- * ".la" will be appended.
+ * ".so*" will be appended.
* @param instance a KInstance used to get the standard paths
*/
static QString findLibrary( const char * name, const KInstance * instance = KGlobal::instance() );
--- kdelibs-3.5.5/kdecore/klibloader.cpp.orig 2006-01-19 17:06:18.000000000 +0000
+++ kdelibs-3.5.5/kdecore/klibloader.cpp 2007-01-05 00:08:39.215039750 +0000
@@ -331,43 +331,59 @@
d = 0L;
}
-static inline QCString makeLibName( const char* name )
+#include <boost/filesystem/exception.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/path.hpp>
+#include <boost/regex.hpp>
+
+QCString makeSharedLibraryName( char const* name, QString const& dir )
{
- QCString libname(name);
- // only append ".la" if there is no extension
- // this allows to load non-libtool libraries as well
- // (mhk, 20000228)
- int pos = libname.findRev('/');
- if (pos < 0)
- pos = 0;
- if (libname.find('.', pos) < 0)
- libname += ".la";
- return libname;
+ try
+ {
+ boost::filesystem::path d( dir.ascii() );
+ std::string p = d.string() + "/" + name + ".so";
+ if ( boost::filesystem::exists( p ) )
+ return p.c_str();
+ boost::regex re( p + "\\..+", boost::regex::extended );
+ for ( boost::filesystem::directory_iterator i( d );
+ i != boost::filesystem::directory_iterator(); ++i )
+ {
+ boost::smatch m;
+ if ( boost::regex_match( i->string(), m, re ) )
+ return m.str().c_str();
+ }
+ }
+ catch ( boost::filesystem::filesystem_error const& )
+ {
+ }
+ return QCString();
}
-//static
QString KLibLoader::findLibrary( const char * name, const KInstance * instance )
{
- QCString libname = makeLibName( name );
-
- // only look up the file if it is not an absolute filename
- // (mhk, 20000228)
- QString libfile;
- if (!QDir::isRelativePath(libname))
- libfile = QFile::decodeName( libname );
- else
- {
- libfile = instance->dirs()->findResource( "module", libname );
- if ( libfile.isEmpty() )
- {
- libfile = instance->dirs()->findResource( "lib", libname );
-#ifndef NDEBUG
- if ( !libfile.isEmpty() && libname.left(3) == "lib" ) // don't warn for kdeinit modules
- kdDebug(150) << "library " << libname << " not found under 'module' but under 'lib'" << endl;
-#endif
- }
- }
- return libfile;
+ try
+ {
+ if ( boost::filesystem::exists( name ) )
+ return name;
+ }
+ catch ( boost::filesystem::filesystem_error const& )
+ {
+ }
+ QStringList dirs = instance->dirs()->resourceDirs( "module" );
+ for ( QStringList::ConstIterator i = dirs.begin(); i != dirs.end(); ++i )
+ {
+ QCString p = makeSharedLibraryName( name, *i );
+ if ( !p.isNull() )
+ return p;
+ }
+ dirs = instance->dirs()->resourceDirs( "lib" );
+ for ( QStringList::ConstIterator i = dirs.begin(); i != dirs.end(); ++i )
+ {
+ QCString p = makeSharedLibraryName( name, *i );
+ if ( !p.isNull() )
+ return p;
+ }
+ return QString::null;
}
@@ -418,11 +434,7 @@
QString libfile = findLibrary( name );
if ( libfile.isEmpty() )
{
- const QCString libname = makeLibName( name );
-#ifndef NDEBUG
- kdDebug(150) << "library=" << name << ": No file named " << libname << " found in paths." << endl;
-#endif
- d->errorMessage = i18n("Library files for \"%1\" not found in paths.").arg(libname);
+ d->errorMessage = i18n("Library files for \"%1\" not found in paths.").arg(name);
return 0;
}
--- kdelibs-3.5.5/kinit/kinit.cpp.orig 2006-10-01 19:33:32.000000000 +0200
+++ kdelibs-3.5.5/kinit/kinit.cpp 2007-01-04 23:39:00.780591750 +0100
@@ -447,7 +447,7 @@
{
/* Relative name without '.la' */
name = _name;
- lib = name + ".la";
+ lib = name;
exec = name;
libpath = QFile::encodeName(KLibLoader::findLibrary( lib, s_instance ));
execpath = execpath_avoid_loops( exec, envc, envs, avoid_loops );
@@ -458,9 +458,7 @@
name = _name;
name = name.mid( name.findRev('/') + 1);
exec = _name;
- if (lib.right(3) == ".la")
- libpath = lib;
- else
+ if ( libpath.findRev( ".so" ) == -1 )
execpath = exec;
}
if (!args)
@@ -1807,7 +1805,7 @@
#ifndef __CYGWIN__
if (!d.suicide && !getenv("KDE_IS_PRELINKED"))
{
- QString konq = locate("lib", "libkonq.la", s_instance);
+ QString konq = KLibLoader::findLibrary( "libkonq", s_instance );
if (!konq.isEmpty())
(void) lt_dlopen(QFile::encodeName(konq).data());
}

View File

@ -1,133 +0,0 @@
Index: kioslave/metainfo/Makefile.am
===================================================================
--- kioslave/metainfo/Makefile.am (Revision 606834)
+++ kioslave/metainfo/Makefile.am (Arbeitskopie)
@@ -2,7 +2,7 @@
## Makefile.am of kdebase/kioslave/metainfo
INCLUDES = $(all_includes)
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+AM_LDFLAGS = $(KDE_RPATH) $(all_libraries)
METASOURCES = AUTO
kde_module_LTLIBRARIES = kio_metainfo.la
Index: kioslave/gzip/Makefile.am
===================================================================
--- kioslave/gzip/Makefile.am (Revision 606834)
+++ kioslave/gzip/Makefile.am (Arbeitskopie)
@@ -1,5 +1,5 @@
INCLUDES = -I$(top_srcdir)/kio $(all_includes)
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+AM_LDFLAGS = $(KDE_RPATH) $(all_libraries)
METASOURCES = AUTO
kde_module_LTLIBRARIES = kgzipfilter.la
Index: kio/tests/Makefile.am
===================================================================
--- kio/tests/Makefile.am (Revision 606834)
+++ kio/tests/Makefile.am (Arbeitskopie)
@@ -18,7 +18,7 @@
INCLUDES= -I$(top_srcdir) -I$(top_srcdir)/kio $(all_includes)
LDADD = $(LIB_KIO)
-AM_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+AM_LDFLAGS = $(KDE_RPATH) $(all_libraries)
check_PROGRAMS = ksycocatest getalltest kruntest ktartest kziptest\
kioslavetest kdirwatchtest kshredtest speed kurifiltertest \
Index: dcop/tests/Makefile.am
===================================================================
--- dcop/tests/Makefile.am (Revision 606834)
+++ dcop/tests/Makefile.am (Arbeitskopie)
@@ -3,7 +3,6 @@
@echo -e "dcop tests not run.\nRun make tests in the tests directory to make them"
INCLUDES = $(all_includes)
-AM_LDFLAGS = $(all_libraries)
METASOURCES = AUTO
@@ -17,7 +16,7 @@
driver_SOURCES = driver.cpp test.stub
driver_LDADD = $(LIB_KDECORE)
-driver_LDFLAGS = $(KDE_RPATH)
+driver_LDFLAGS = $(KDE_RPATH) $(all_libraries)
CLEANFILES = batch.generated definitions.generated driver.generated shell.generated
Index: dcop/dcopidl2cpp/Makefile.am
===================================================================
--- dcop/dcopidl2cpp/Makefile.am (Revision 606834)
+++ dcop/dcopidl2cpp/Makefile.am (Arbeitskopie)
@@ -1,6 +1,5 @@
INCLUDES = $(all_includes)
-AM_LDFLAGS = $(all_libraries)
####### Files
@@ -10,7 +9,7 @@
noinst_HEADERS = main.h
dcopidl2cpp_LDADD = $(LIB_QT)
-dcopidl2cpp_LDFLAGS = $(KDE_RPATH)
+dcopidl2cpp_LDFLAGS = $(all_libraries) $(KDE_RPATH)
dcopidl_output.kidl: ../dcopidl/dcopidl $(srcdir)/dcopidl_test.h
../dcopidl/dcopidl $(srcdir)/dcopidl_test.h > dcopidl_output.kidl
Index: dcop/client/Makefile.am
===================================================================
--- dcop/client/Makefile.am (Revision 606834)
+++ dcop/client/Makefile.am (Arbeitskopie)
@@ -1,6 +1,5 @@
INCLUDES = $(all_includes)
-AM_LDFLAGS = $(all_libraries)
DCOP_LIB = ../libDCOP.la
####### Files
@@ -9,19 +8,19 @@
dcop_SOURCES = dcop.cpp
dcop_LDADD = $(LIB_QT) $(DCOP_LIB)
-dcop_LDFLAGS = $(KDE_RPATH)
+dcop_LDFLAGS = $(KDE_RPATH) $(all_libraries)
dcopstart_SOURCES = dcopstart.cpp
dcopstart_LDADD = $(LIB_QT) $(DCOP_LIB)
-dcopstart_LDFLAGS = $(KDE_RPATH)
+dcopstart_LDFLAGS = $(KDE_RPATH) $(all_libraries)
dcopquit_SOURCES = dcopquit.cpp
dcopquit_LDADD = $(LIB_QT) $(DCOP_LIB)
-dcopquit_LDFLAGS = $(KDE_RPATH)
+dcopquit_LDFLAGS = $(KDE_RPATH) $(all_libraries)
dcopfind_SOURCES = dcopfind.cpp
dcopfind_LDADD = $(LIB_QT) $(DCOP_LIB)
-dcopfind_LDFLAGS = $(KDE_RPATH)
+dcopfind_LDFLAGS = $(KDE_RPATH) $(all_libraries)
dcopclient_SOURCES = dcopclient.c
dcopobject_SOURCES = dcopobject.c
Index: dcop/dcopidl/Makefile.am
===================================================================
--- dcop/dcopidl/Makefile.am (Revision 606834)
+++ dcop/dcopidl/Makefile.am (Arbeitskopie)
@@ -1,6 +1,5 @@
INCLUDES = $(all_includes)
-AM_LDFLAGS = $(all_libraries)
AM_CPPFLAGS = -DYYDEBUG
####### Files
@@ -11,7 +10,7 @@
noinst_HEADERS = yacc.cc.h
dcopidl_LDADD = $(LIB_QT)
-dcopidl_LDFLAGS = $(KDE_RPATH)
+dcopidl_LDFLAGS = $(KDE_RPATH) $(all_libraries)
####### Build rules

View File

@ -1,13 +1,10 @@
diff -up kdelibs-3.5.10/kio/kssl/kopenssl.cc.openssl kdelibs-3.5.10/kio/kssl/kopenssl.cc
--- kdelibs-3.5.10/kio/kssl/kopenssl.cc.openssl 2006-07-22 03:16:39.000000000 -0500
+++ kdelibs-3.5.10/kio/kssl/kopenssl.cc 2009-04-19 16:34:14.000000000 -0500
@@ -329,6 +329,20 @@ KConfig *cfg;
diff -up kdelibs-3.5.8/kio/kssl/kopenssl.cc.openssl kdelibs-3.5.8/kio/kssl/kopenssl.cc
--- kdelibs-3.5.8/kio/kssl/kopenssl.cc.openssl 2006-07-22 03:16:39.000000000 -0500
+++ kdelibs-3.5.8/kio/kssl/kopenssl.cc 2007-12-04 08:13:44.000000000 -0600
@@ -329,6 +329,17 @@ KConfig *cfg;
#ifdef SHLIB_VERSION_NUMBER
<< "libssl.so." SHLIB_VERSION_NUMBER
#endif
+ << "libssl.so.10"
+ << "libssl.so.0.9.8k"
+ << "libssl.so.8"
+ << "libssl.so.0.9.8g"
+ << "libssl.so.7"
+ << "libssl.so.0.9.8b"
@ -22,13 +19,10 @@ diff -up kdelibs-3.5.10/kio/kssl/kopenssl.cc.openssl kdelibs-3.5.10/kio/kssl/kop
<< "libssl.so"
<< "libssl.so.0"
#endif
@@ -346,6 +360,20 @@ KConfig *cfg;
@@ -346,6 +357,17 @@ KConfig *cfg;
#ifdef SHLIB_VERSION_NUMBER
<< "libcrypto.so." SHLIB_VERSION_NUMBER
#endif
+ << "libcrypto.so.10"
+ << "libcrypto.so.0.9.8k"
+ << "libcrypto.so.8"
+ << "libcrypto.so.0.9.8g"
+ << "libcrypto.so.7"
+ << "libcrypto.so.0.9.8b"

View File

@ -1,12 +1,12 @@
diff -ur kdelibs-3.5.10/kdecore/kcrash.cpp kdelibs-3.5.10-drkonqi-plasma5/kdecore/kcrash.cpp
--- kdelibs-3.5.10/kdecore/kcrash.cpp 2007-01-15 12:34:17.000000000 +0100
+++ kdelibs-3.5.10-drkonqi-plasma5/kdecore/kcrash.cpp 2017-01-22 23:25:21.373378496 +0100
diff -ur kdelibs-3.5.9/kdecore/kcrash.cpp kdelibs-3.5.9-drkonqi-kde4/kdecore/kcrash.cpp
--- kdelibs-3.5.9/kdecore/kcrash.cpp 2007-01-15 12:34:17.000000000 +0100
+++ kdelibs-3.5.9-drkonqi-kde4/kdecore/kcrash.cpp 2008-07-02 08:24:37.000000000 +0200
@@ -158,7 +158,7 @@
int i = 0;
// argument 0 has to be drkonqi
- argv[i++] = "drkonqi";
+ argv[i++] = "/usr/libexec/drkonqi";
+ argv[i++] = "/usr/libexec/kde4/drkonqi";
#if defined Q_WS_X11
// start up on the correct display
@ -15,7 +15,7 @@ diff -ur kdelibs-3.5.10/kdecore/kcrash.cpp kdelibs-3.5.10-drkonqi-plasma5/kdecor
if(!geteuid() && setuid(getuid()) < 0)
_exit(253);
- execvp("drkonqi", const_cast< char** >( argv ));
+ execv("/usr/libexec/drkonqi", const_cast< char** >( argv ));
+ execv("/usr/libexec/kde4/drkonqi", const_cast< char** >( argv ));
_exit(errno);
}
else

View File

@ -0,0 +1,15 @@
diff -ur kdelibs-3.5.9/kio/kio/kdirwatch.cpp kdelibs-3.5.9-fix-flock-redefinition/kio/kio/kdirwatch.cpp
--- kdelibs-3.5.9/kio/kio/kdirwatch.cpp 2006-07-22 10:16:37.000000000 +0200
+++ kdelibs-3.5.9-fix-flock-redefinition/kio/kio/kdirwatch.cpp 2008-08-23 00:59:17.000000000 +0200
@@ -71,7 +71,11 @@
#include <linux/types.h>
// Linux kernel headers are documented to not compile
#define _S390_BITOPS_H
+#define flock linux_flock
+#define flock64 linux_flock64
#include <linux/inotify.h>
+#undef flock
+#undef flock64
static inline int inotify_init (void)
{

View File

@ -1,111 +0,0 @@
--- kdelibs-3.5.10/kio/kssl/ksslinfodlg.cc 2007-05-14 09:52:36.000000000 +0200
+++ kdelibs-3.5.10/kio/kssl/ksslinfodlg.cc 2011-10-07 20:38:30.000000000 +0200
@@ -253,6 +253,14 @@
layout->addWidget(new QLabel(i18n("%1 bits used of a %2 bit cipher").arg(usedbits).arg(bits), this), 10, 1);
d->m_layout->addMultiCell(layout, 2, 2, 0, 2);
+ ipl->setTextFormat(Qt::PlainText);
+ urlLabel->setTextFormat(Qt::PlainText);
+ d->_serialNum->setTextFormat(Qt::PlainText);
+ d->_csl->setTextFormat(Qt::PlainText);
+ d->_validFrom->setTextFormat(Qt::PlainText);
+ d->_validUntil->setTextFormat(Qt::PlainText);
+ d->_digest->setTextFormat(Qt::PlainText);
+
displayCert(cert);
}
@@ -400,32 +408,32 @@
if (!(tmp = cert.getValue("O")).isEmpty()) {
label = new QLabel(i18n("Organization:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ (new QLabel(tmp, _frame))->setTextFormat(Qt::PlainText);
}
if (!(tmp = cert.getValue("OU")).isEmpty()) {
label = new QLabel(i18n("Organizational unit:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ (new QLabel(tmp, _frame))->setTextFormat(Qt::PlainText);
}
if (!(tmp = cert.getValue("L")).isEmpty()) {
label = new QLabel(i18n("Locality:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ (new QLabel(tmp, _frame))->setTextFormat(Qt::PlainText);
}
if (!(tmp = cert.getValue("ST")).isEmpty()) {
label = new QLabel(i18n("Federal State","State:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ (new QLabel(tmp, _frame))->setTextFormat(Qt::PlainText);
}
if (!(tmp = cert.getValue("C")).isEmpty()) {
label = new QLabel(i18n("Country:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ (new QLabel(tmp, _frame))->setTextFormat(Qt::PlainText);
}
if (!(tmp = cert.getValue("CN")).isEmpty()) {
label = new QLabel(i18n("Common name:"), _frame);
label->setAlignment(Qt::AlignLeft | Qt::AlignTop);
- new QLabel(tmp, _frame);
+ (new QLabel(tmp, _frame))->setTextFormat(Qt::PlainText);
}
if (!(tmp = cert.getValue("Email")).isEmpty()) {
label = new QLabel(i18n("Email:"), _frame);
@@ -435,6 +443,7 @@
connect(mail, SIGNAL(leftClickedURL(const QString &)), mailCatcher, SLOT(mailClicked(const QString &)));
} else {
label = new QLabel(tmp, _frame);
+ label->setTextFormat(Qt::PlainText);
}
}
if (label && viewport()) {
--- kdelibs-3.5.10/kioslave/http/http.cc 2008-02-13 10:41:06.000000000 +0100
+++ kdelibs-3.5.10-kio_http-qlabel/kioslave/http/http.cc 2011-10-07 21:09:39.000000000 +0200
@@ -183,6 +183,26 @@
return sanitizedHeaders.stripWhiteSpace();
}
+static QString htmlEscape(const QString &plain)
+{
+ QString rich;
+ rich.reserve(uint(plain.length() * 1.1));
+ for (uint i = 0; i < plain.length(); ++i) {
+ if (plain.at(i) == '<')
+ rich += "&lt;";
+ else if (plain.at(i) == '>')
+ rich += "&gt;";
+ else if (plain.at(i) == '&')
+ rich += "&amp;";
+ else if (plain.at(i) == '"')
+ rich += "&quot;";
+ else
+ rich += plain.at(i);
+ }
+ rich.squeeze();
+ return rich;
+}
+
#define NO_SIZE ((KIO::filesize_t) -1)
@@ -5173,7 +5193,7 @@
info.verifyPath = false;
info.digestInfo = m_strAuthorization;
info.commentLabel = i18n( "Site:" );
- info.comment = i18n("<b>%1</b> at <b>%2</b>").arg( m_strRealm ).arg( m_request.hostname );
+ info.comment = i18n("<b>%1</b> at <b>%2</b>").arg( htmlEscape(m_strRealm) ).arg( m_request.hostname );
}
}
else if ( m_responseCode == 407 )
@@ -5190,7 +5210,7 @@
info.verifyPath = false;
info.digestInfo = m_strProxyAuthorization;
info.commentLabel = i18n( "Proxy:" );
- info.comment = i18n("<b>%1</b> at <b>%2</b>").arg( m_strProxyRealm ).arg( m_proxyURL.host() );
+ info.comment = i18n("<b>%1</b> at <b>%2</b>").arg( htmlEscape(m_strProxyRealm) ).arg( m_proxyURL.host() );
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,90 +0,0 @@
diff -up arts-1.5.10/libltdl/ltdl.c.CVE-2009-3736 arts-1.5.10/libltdl/ltdl.c
--- arts-1.5.10/libltdl/ltdl.c.CVE-2009-3736 2008-08-19 22:18:38.000000000 +0200
+++ arts-1.5.10/libltdl/ltdl.c 2009-12-08 16:02:38.000000000 +0100
@@ -1454,9 +1454,10 @@ lt_dlexit ()
}
static int
-tryall_dlopen (handle, filename)
+tryall_dlopen (handle, filename, useloader)
lt_dlhandle *handle;
const char *filename;
+ const char *useloader;
{
lt_dlhandle cur;
lt_dlloader *loader;
@@ -1514,6 +1515,11 @@ tryall_dlopen (handle, filename)
while (loader)
{
+ if (useloader && strcmp(loader->loader_name, useloader))
+ {
+ loader = loader->next;
+ continue;
+ }
lt_user_data data = loader->dlloader_data;
cur->module = loader->module_open (data, filename);
@@ -1556,7 +1562,7 @@ find_module (handle, dir, libdir, dlname
/* try to open the old library first; if it was dlpreopened,
we want the preopened version of it, even if a dlopenable
module is available */
- if (old_name && tryall_dlopen(handle, old_name) == 0)
+ if (old_name && tryall_dlopen(handle, old_name, "dlpreload") == 0)
{
return 0;
}
@@ -1579,7 +1585,7 @@ find_module (handle, dir, libdir, dlname
}
sprintf (filename, "%s/%s", libdir, dlname);
- error = (tryall_dlopen (handle, filename) != 0);
+ error = (tryall_dlopen (handle, filename, NULL) != 0);
LT_DLFREE (filename);
if (!error)
@@ -1611,7 +1617,7 @@ find_module (handle, dir, libdir, dlname
strcat(filename, objdir);
strcat(filename, dlname);
- error = tryall_dlopen (handle, filename) != 0;
+ error = tryall_dlopen (handle, filename, NULL) != 0;
LT_DLFREE (filename);
if (!error)
{
@@ -1634,7 +1640,7 @@ find_module (handle, dir, libdir, dlname
}
strcat(filename, dlname);
- error = (tryall_dlopen (handle, filename) != 0);
+ error = (tryall_dlopen (handle, filename, NULL) != 0);
LT_DLFREE (filename);
if (!error)
{
@@ -1749,7 +1755,7 @@ find_file (basename, search_path, pdir,
strcpy(filename+lendir, basename);
if (handle)
{
- if (tryall_dlopen (handle, filename) == 0)
+ if (tryall_dlopen (handle, filename, NULL) == 0)
{
result = (lt_ptr) handle;
goto cleanup;
@@ -2063,7 +2069,7 @@ lt_dlopen (filename)
/* lt_dlclose()ing yourself is very bad! Disallow it. */
LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG);
- if (tryall_dlopen (&newhandle, 0) != 0)
+ if (tryall_dlopen (&newhandle, 0, NULL) != 0)
{
LT_DLFREE (handle);
return 0;
@@ -2368,7 +2374,7 @@ lt_dlopen (filename)
#ifdef LTDL_SYSSEARCHPATH
&& !find_file (basename, sys_search_path, 0, &newhandle)
#endif
- )) && tryall_dlopen (&newhandle, filename))
+ )) && tryall_dlopen (&newhandle, filename, NULL))
{
LT_DLFREE (handle);
goto cleanup;