Gentoo Archives: gentoo-commits

From: "Mark Wright (gienah)" <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-libs/qwt/files: qwt-6.0.2-invalid-read.patch
Date: Thu, 31 Jan 2013 11:41:02
Message-Id: 20130131114058.7F7AD2171E@flycatcher.gentoo.org
1 gienah 13/01/31 11:40:58
2
3 Added: qwt-6.0.2-invalid-read.patch
4 Log:
5 Bump qwt to 6.0.2. Add mathml USE flag.
6
7 (Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
8
9 Revision Changes Path
10 1.1 x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch?rev=1.1&content-type=text/plain
14
15 Index: qwt-6.0.2-invalid-read.patch
16 ===================================================================
17 --- qwt-6.0.2-orig/textengines/mathml/qwt_mml_document.cpp 2012-12-01 00:22:46.752106265 +1100
18 +++ qwt-6.0.2/textengines/mathml/qwt_mml_document.cpp 2013-01-31 14:29:30.590197611 +1100
19 @@ -4421,7 +4421,10 @@
20 if ( ok )
21 return value;
22 else
23 - qWarning( "Could not convert %s to form", value_str.toLatin1().data() );
24 + {
25 + QByteArray value_str_ba = value_str.toLatin1();
26 + qWarning( "Could not convert %s to form", value_str_ba.data() );
27 + }
28
29 }
30
31 @@ -4658,7 +4661,10 @@
32 continue;
33 }
34 else
35 - qWarning( "MmlMtableNode::layoutSymbol(): could not parse value %s%%", value.toLatin1().data() );
36 + {
37 + QByteArray value_ba = value.toLatin1();
38 + qWarning( "MmlMtableNode::layoutSymbol(): could not parse value %s%%", value_ba.data() );
39 + }
40 }
41
42 // Relatively sized column, but we failed to parse the factor. Treat is like an auto
43 @@ -5167,7 +5173,8 @@
44 double factor = factor_str.toFloat( &float_ok );
45 if ( !float_ok || factor < 0 )
46 {
47 - qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value.toLatin1().data() );
48 + QByteArray value_ba = value.toLatin1();
49 + qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value_ba.data() );
50 return 0;
51 }
52
53 @@ -5196,7 +5203,8 @@
54 unit_size = QwtMmlNode::interpretSpacing( "1" + pseudo_unit, &unit_ok );
55 if ( !unit_ok )
56 {
57 - qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value.toLatin1().data() );
58 + QByteArray value_ba = value.toLatin1();
59 + qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value_ba.data() );
60 return 0;
61 }
62 }
63 @@ -5368,7 +5376,8 @@
64 return ( int )( em * factor );
65 else
66 {
67 - qWarning( "interpretSpacing(): could not parse \"%sem\"", value.toLatin1().data() );
68 + QByteArray value_ba = value.toLatin1();
69 + qWarning( "interpretSpacing(): could not parse \"%sem\"", value_ba.data() );
70 if ( ok != 0 )
71 *ok = false;
72 return 0;
73 @@ -5384,7 +5393,8 @@
74 return ( int )( ex * factor );
75 else
76 {
77 - qWarning( "interpretSpacing(): could not parse \"%sex\"", value.toLatin1().data() );
78 + QByteArray value_ba = value.toLatin1();
79 + qWarning( "interpretSpacing(): could not parse \"%sex\"", value_ba.data() );
80 if ( ok != 0 )
81 *ok = false;
82 return 0;
83 @@ -5406,7 +5416,8 @@
84 }
85 else
86 {
87 - qWarning( "interpretSpacing(): could not parse \"%scm\"", value.toLatin1().data() );
88 + QByteArray value_ba = value.toLatin1();
89 + qWarning( "interpretSpacing(): could not parse \"%scm\"", value_ba.data() );
90 if ( ok != 0 )
91 *ok = false;
92 return 0;
93 @@ -5428,7 +5439,8 @@
94 }
95 else
96 {
97 - qWarning( "interpretSpacing(): could not parse \"%smm\"", value.toLatin1().data() );
98 + QByteArray value_ba = value.toLatin1();
99 + qWarning( "interpretSpacing(): could not parse \"%smm\"", value_ba.data() );
100 if ( ok != 0 )
101 *ok = false;
102 return 0;
103 @@ -5450,7 +5462,8 @@
104 }
105 else
106 {
107 - qWarning( "interpretSpacing(): could not parse \"%sin\"", value.toLatin1().data() );
108 + QByteArray value_ba = value.toLatin1();
109 + qWarning( "interpretSpacing(): could not parse \"%sin\"", value_ba.data() );
110 if ( ok != 0 )
111 *ok = false;
112 return 0;
113 @@ -5466,7 +5479,8 @@
114 return i;
115 else
116 {
117 - qWarning( "interpretSpacing(): could not parse \"%spx\"", value.toLatin1().data() );
118 + QByteArray value_ba = value.toLatin1();
119 + qWarning( "interpretSpacing(): could not parse \"%spx\"", value_ba.data() );
120 if ( ok != 0 )
121 *ok = false;
122 return 0;
123 @@ -5478,7 +5492,8 @@
124 if ( float_ok && i >= 0 )
125 return i;
126
127 - qWarning( "interpretSpacing(): could not parse \"%s\"", value.toLatin1().data() );
128 + QByteArray value_ba = value.toLatin1();
129 + qWarning( "interpretSpacing(): could not parse \"%s\"", value_ba.data() );
130 if ( ok != 0 )
131 *ok = false;
132 return 0;
133 @@ -5503,7 +5518,8 @@
134 return ( int )( base * factor / 100.0 );
135 }
136
137 - qWarning( "interpretPercentSpacing(): could not parse \"%s%%\"", value.toLatin1().data() );
138 + QByteArray value_ba = value.toLatin1();
139 + qWarning( "interpretPercentSpacing(): could not parse \"%s%%\"", value_ba.data() );
140 if ( ok != 0 )
141 *ok = false;
142 return 0;
143 @@ -5528,7 +5544,8 @@
144 return pt_size;
145 }
146
147 - qWarning( "interpretPointSize(): could not parse \"%spt\"", value.toLatin1().data() );
148 + QByteArray value_ba = value.toLatin1();
149 + qWarning( "interpretPointSize(): could not parse \"%spt\"", value_ba.data() );
150 if ( ok != 0 )
151 *ok = false;
152 return 0;
153 @@ -5737,7 +5754,8 @@
154 */
155 static const QwtMmlOperSpec *searchOperSpecData( const QString &name )
156 {
157 - const char *name_latin1 = name.toLatin1().data();
158 + QByteArray name_latin1_ba = name.toLatin1();
159 + const char *name_latin1 = name_latin1_ba.data();
160
161 // binary search
162 // establish invariant g_oper_spec_data[begin].name < name < g_oper_spec_data[end].name
163 @@ -5789,7 +5807,8 @@
164 if ( spec == 0 )
165 continue;
166
167 - const char *name_latin1 = name.toLatin1().data();
168 + QByteArray name_ba = name.toLatin1();
169 + const char *name_latin1 = name_ba.data();
170
171 // backtrack to the first instance of name
172 while ( spec > g_oper_spec_data && qstrcmp( ( spec - 1 )->name, name_latin1 ) == 0 )
173 @@ -5918,7 +5937,8 @@
174 if ( ok != 0 )
175 *ok = false;
176
177 - qWarning( "interpretMathVariant(): could not parse value: \"%s\"", value.toLatin1().data() );
178 + QByteArray value_ba = value.toLatin1();
179 + qWarning( "interpretMathVariant(): could not parse value: \"%s\"", value_ba.data() );
180
181 return QwtMml::NormalMV;
182 }
183 @@ -5938,7 +5958,8 @@
184 if ( ok != 0 )
185 *ok = false;
186
187 - qWarning( "interpretForm(): could not parse value \"%s\"", value.toLatin1().data() );
188 + QByteArray value_ba = value.toLatin1();
189 + qWarning( "interpretForm(): could not parse value \"%s\"", value_ba.data() );
190 return QwtMml::InfixForm;
191 }
192
193 @@ -5959,7 +5980,8 @@
194 if ( ok != 0 )
195 *ok = false;
196
197 - qWarning( "interpretColAlign(): could not parse value \"%s\"", value.toLatin1().data() );
198 + QByteArray value_ba = value.toLatin1();
199 + qWarning( "interpretColAlign(): could not parse value \"%s\"", value_ba.data() );
200 return QwtMml::ColAlignCenter;
201 }
202
203 @@ -5984,7 +6006,8 @@
204 if ( ok != 0 )
205 *ok = false;
206
207 - qWarning( "interpretRowAlign(): could not parse value \"%s\"", value.toLatin1().data() );
208 + QByteArray value_ba = value.toLatin1();
209 + qWarning( "interpretRowAlign(): could not parse value \"%s\"", value_ba.data() );
210 return QwtMml::RowAlignAxis;
211 }
212
213 @@ -6018,7 +6041,8 @@
214 if ( ok != 0 )
215 *ok = false;
216
217 - qWarning( "interpretFrameType(): could not parse value \"%s\"", value.toLatin1().data() );
218 + QByteArray value_ba = value.toLatin1();
219 + qWarning( "interpretFrameType(): could not parse value \"%s\"", value_ba.data() );
220 return QwtMml::FrameNone;
221 }
222
223 @@ -6030,7 +6054,8 @@
224 QStringList l = value_list.split( ' ' );
225 if ( l.count() != 2 )
226 {
227 - qWarning( "interpretFrameSpacing: could not parse value \"%s\"", value_list.toLatin1().data() );
228 + QByteArray value_list_ba = value_list.toLatin1();
229 + qWarning( "interpretFrameSpacing: could not parse value \"%s\"", value_list_ba.data() );
230 if ( ok != 0 )
231 *ok = false;
232 return QwtMml::FrameSpacing( ( int )( 0.4 * em ), ( int )( 0.5 * ex ) );
233 @@ -6089,7 +6114,10 @@
234 else if ( value == "bold" )
235 fn.setBold( true );
236 else
237 - qWarning( "interpretDepreciatedFontAttr(): could not parse fontweight \"%s\"", value.toLatin1().data() );
238 + {
239 + QByteArray value_ba = value.toLatin1();
240 + qWarning( "interpretDepreciatedFontAttr(): could not parse fontweight \"%s\"", value_ba.data() );
241 + }
242 }
243
244 if ( font_attr.contains( "fontstyle" ) )
245 @@ -6100,7 +6128,10 @@
246 else if ( value == "italic" )
247 fn.setItalic( true );
248 else
249 - qWarning( "interpretDepreciatedFontAttr(): could not parse fontstyle \"%s\"", value.toLatin1().data() );
250 + {
251 + QByteArray value_ba = value.toLatin1();
252 + qWarning( "interpretDepreciatedFontAttr(): could not parse fontstyle \"%s\"", value_ba.data() );
253 + }
254 }
255
256 if ( font_attr.contains( "fontfamily" ) )
257 @@ -6150,7 +6181,8 @@
258
259 if ( ok != 0 )
260 *ok = false;
261 - qWarning( "interpretMathSize(): could not parse mathsize \"%s\"", value.toLatin1().data() );
262 + QByteArray value_ba = value.toLatin1();
263 + qWarning( "interpretMathSize(): could not parse mathsize \"%s\"", value_ba.data() );
264 return fn;
265 }