summaryrefslogtreecommitdiffstats
path: root/src/qtbase-1.patch
blob: 73423d8406cd9173d62610bd433d376e58f0d3a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
This file is part of MXE.
See index.html for further information.

From 01ab4dd7d61a047c93164b8d8511ddb31d5740f1 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Tue, 26 Feb 2013 13:23:33 +0100
Subject: [PATCH 1/5] use pkg-config for freetype

Change-Id: Id2f78ed9dbdcacd570eb25982cbd700d0437542a

diff --git a/src/platformsupport/fontdatabases/basic/basic.pri b/src/platformsupport/fontdatabases/basic/basic.pri
index c2b882e..3834d83 100644
--- a/src/platformsupport/fontdatabases/basic/basic.pri
+++ b/src/platformsupport/fontdatabases/basic/basic.pri
@@ -83,5 +83,7 @@ contains(QT_CONFIG, freetype) {
 } else:contains(QT_CONFIG, system-freetype) {
     # pull in the proper freetype2 include directory
     include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
+    CONFIG += link_pkgconfig
+    PKGCONFIG += freetype2
 }
 
-- 
2.1.0


From a6a467a7d8e6aaec6197c77887cae7c06f3c8659 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 18 May 2013 23:07:46 +0200
Subject: [PATCH 2/5] use pkgconfig for icu detection (MXE specific)

Change-Id: I874171361fec812cb5a5a56e4d8d90a630be3bf3

diff --git a/config.tests/unix/icu/icu.pro b/config.tests/unix/icu/icu.pro
index 16267ff..dd9fb6c 100644
--- a/config.tests/unix/icu/icu.pro
+++ b/config.tests/unix/icu/icu.pro
@@ -2,16 +2,5 @@ SOURCES = icu.cpp
 CONFIG += console
 CONFIG -= qt dylib
 
-win32 {
-    CONFIG(static, static|shared) {
-        CONFIG(debug, debug|release) {
-            LIBS += -lsicuind -lsicuucd -lsicudtd
-        } else {
-            LIBS += -lsicuin -lsicuuc -lsicudt
-        }
-    } else {
-        LIBS += -licuin -licuuc -licudt
-    }
-} else {
-    LIBS += -licui18n -licuuc -licudata
-}
+CONFIG += link_pkgconfig
+PKGCONFIG += icu-i18n
-- 
2.1.0


From eed2ebcf407f7e674447917f9657a689d0d2233f Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 21 Jun 2014 13:12:49 +0200
Subject: [PATCH 3/5] use pkg-config for harfbuzz (MXE specific)

Change-Id: Id4e4c37d68b63c9f480d72a561d95d4d2a5ded50

diff --git a/config.tests/unix/harfbuzz/harfbuzz.pro b/config.tests/unix/harfbuzz/harfbuzz.pro
index 32edd6e..a7f2c28 100644
--- a/config.tests/unix/harfbuzz/harfbuzz.pro
+++ b/config.tests/unix/harfbuzz/harfbuzz.pro
@@ -1,3 +1,4 @@
 SOURCES = harfbuzz.cpp
 CONFIG -= qt dylib
-LIBS += -lharfbuzz
+CONFIG += link_pkgconfig
+PKGCONFIG += harfbuzz
diff --git a/src/3rdparty/harfbuzzng.pri b/src/3rdparty/harfbuzzng.pri
index 7443368..c24e684 100644
--- a/src/3rdparty/harfbuzzng.pri
+++ b/src/3rdparty/harfbuzzng.pri
@@ -2,5 +2,6 @@ contains(QT_CONFIG, harfbuzz) {
     INCLUDEPATH += $$PWD/harfbuzz-ng/include
     LIBS_PRIVATE += -L$$QT_BUILD_TREE/lib -lqtharfbuzzng$$qtPlatformTargetSuffix()
 } else:contains(QT_CONFIG, system-harfbuzz) {
-    LIBS_PRIVATE += -lharfbuzz
+    CONFIG += link_pkgconfig
+    PKGCONFIG += harfbuzz
 }
-- 
2.1.0


From 315a827326804cd76b43aa01597dc761bb75268e Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Mon, 8 Dec 2014 14:15:12 +0100
Subject: [PATCH 4/5] fix oci config test on windows

Change-Id: If1ce2241682259ca495b0ba68bf18410f8548922

diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro
index 3ffda1d..39b6f3759 100644
--- a/config.tests/unix/oci/oci.pro
+++ b/config.tests/unix/oci/oci.pro
@@ -1,3 +1,3 @@
 SOURCES = oci.cpp
 CONFIG -= qt dylib
-LIBS += -lclntsh
+!win32:LIBS += -lclntsh
-- 
2.1.0


From 22e870578fbf6d25178674fdc6ff032257459eb9 Mon Sep 17 00:00:00 2001
From: "Richard J. Moore" <rich@kde.org>
Date: Sat, 21 Feb 2015 17:43:21 +0000
Subject: [PATCH 5/5] Fix a division by zero when processing malformed BMP
 files.

This fixes a division by 0 when processing a maliciously crafted BMP
file. No impact beyond DoS.

Task-number: QTBUG-44547
Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
(cherry picked from commit 661f6bfd032dacc62841037732816a583640e187)

diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp
index 21c1a2f..df66499 100644
--- a/src/gui/image/qbmphandler.cpp
+++ b/src/gui/image/qbmphandler.cpp
@@ -314,12 +314,20 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int
         }
     } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
         red_shift = calc_shift(red_mask);
+        if (((red_mask >> red_shift) + 1) == 0)
+            return false;
         red_scale = 256 / ((red_mask >> red_shift) + 1);
         green_shift = calc_shift(green_mask);
+        if (((green_mask >> green_shift) + 1) == 0)
+            return false;
         green_scale = 256 / ((green_mask >> green_shift) + 1);
         blue_shift = calc_shift(blue_mask);
+        if (((blue_mask >> blue_shift) + 1) == 0)
+            return false;
         blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
         alpha_shift = calc_shift(alpha_mask);
+        if (((alpha_mask >> alpha_shift) + 1) == 0)
+            return false;
         alpha_scale = 256 / ((alpha_mask >> alpha_shift) + 1);
     } else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
         blue_mask = 0x000000ff;
-- 
2.1.0