summaryrefslogtreecommitdiffstats
path: root/testing/kdelibs/kdelibs-skipname.patch
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-05-09 15:50:08 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2011-05-09 15:50:08 -0500
commit1aa92a26831da8c12f7a95488a4da104bca05ac7 (patch)
tree1be925e1dc2c5c119091151815b311307d3ff14c /testing/kdelibs/kdelibs-skipname.patch
parent705c8367e9dcb834daf3960787281813e29ae27b (diff)
downloadaports-1aa92a26831da8c12f7a95488a4da104bca05ac7.tar.bz2
aports-1aa92a26831da8c12f7a95488a4da104bca05ac7.tar.xz
testing/kdelibs: new aport
Diffstat (limited to 'testing/kdelibs/kdelibs-skipname.patch')
-rw-r--r--testing/kdelibs/kdelibs-skipname.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/testing/kdelibs/kdelibs-skipname.patch b/testing/kdelibs/kdelibs-skipname.patch
new file mode 100644
index 000000000..7bcb5895e
--- /dev/null
+++ b/testing/kdelibs/kdelibs-skipname.patch
@@ -0,0 +1,60 @@
+--- kdelibs-4.6.3.orig/kio/misc/kpac/discovery.cpp
++++ kdelibs-4.6.3/kio/misc/kpac/discovery.cpp
+@@ -90,6 +90,34 @@
+ return !m_hostname.isEmpty();
+ }
+
++ int
++ Discovery::skipName(const unsigned char *comp_dn, const unsigned char *eom) const
++ {
++ const u_char *cp;
++ int n;
++
++ cp = comp_dn;
++ while (cp < eom && (n = *cp++)) {
++ /*
++ * check for indirection
++ */
++ switch (n & INDIR_MASK) {
++ case 0: /* normal case, n == len */
++ cp += n;
++ continue;
++ case INDIR_MASK: /* indirection */
++ cp++;
++ break;
++ default: /* illegal type */
++ return (-1);
++ }
++ break;
++ }
++ if (cp > eom)
++ return (-1);
++ return (cp - comp_dn);
++ }
++
+ bool Discovery::checkDomain() const
+ {
+ // If a domain has a SOA record, don't traverse any higher.
+@@ -107,10 +135,10 @@
+ unsigned char* pos = response.buf + sizeof( response.header );
+ unsigned char* end = response.buf + len;
+ // skip query section
+- pos += dn_skipname( pos, end ) + QFIXEDSZ;
++ pos += this->skipName( pos, end ) + QFIXEDSZ;
+ if ( pos >= end ) return true;
+ // skip answer domain
+- pos += dn_skipname( pos, end );
++ pos += this->skipName( pos, end );
+ short type;
+ GETSHORT( type, pos );
+ return type != T_SOA;
+--- kdelibs-4.6.3.orig/kio/misc/kpac/discovery.h
++++ kdelibs-4.6.3/kio/misc/kpac/discovery.h
+@@ -43,6 +43,7 @@
+ private:
+ bool initHostName();
+ bool checkDomain() const;
++ int skipName(const unsigned char*, const unsigned char*) const;
+
+ KProcess* m_helper;
+ QString m_hostname;