/[packages]/updates/5/libextractor/current/SOURCES/7cc63b001ceaf81143795321379c835486d0c92e.patch
ViewVC logotype

Contents of /updates/5/libextractor/current/SOURCES/7cc63b001ceaf81143795321379c835486d0c92e.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1186228 - (show annotations) (download)
Thu Dec 28 15:04:25 2017 UTC (6 years, 3 months ago) by luigiwalser
File size: 8458 byte(s)
add patch from fedora to fix CVE-2017-17440
1 diff --git a/src/include/extractor.h b/src/include/extractor.h
2 index 0325dc6..782134b 100644
3 --- a/src/include/extractor.h
4 +++ b/src/include/extractor.h
5 @@ -35,7 +35,7 @@ extern "C" {
6 * 0.2.6-1 => 0x00020601
7 * 4.5.2-0 => 0x04050200
8 */
9 -#define EXTRACTOR_VERSION 0x01060000
10 +#define EXTRACTOR_VERSION 0x01060001
11
12 #include <stdio.h>
13
14 diff --git a/src/plugins/gif_extractor.c b/src/plugins/gif_extractor.c
15 index aae2b82..8ee5807 100644
16 --- a/src/plugins/gif_extractor.c
17 +++ b/src/plugins/gif_extractor.c
18 @@ -43,7 +43,7 @@ gif_read_func (GifFileType *ft,
19 struct EXTRACTOR_ExtractContext *ec = ft->UserData;
20 void *data;
21 ssize_t ret;
22 -
23 +
24 ret = ec->read (ec->cls,
25 &data,
26 arg);
27 @@ -55,7 +55,7 @@ gif_read_func (GifFileType *ft,
28
29
30 /**
31 - * Main entry method for the 'image/gif' extraction plugin.
32 + * Main entry method for the 'image/gif' extraction plugin.
33 *
34 * @param ec extraction context provided to the plugin
35 */
36 @@ -72,7 +72,7 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
37 return; /* not a GIF */
38 #else
39 int gif_error;
40 -
41 +
42 gif_error = 0;
43 gif_file = DGifOpen (ec, &gif_read_func, &gif_error);
44 if (gif_file == NULL || gif_error != 0)
45 @@ -97,8 +97,8 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
46 return;
47 snprintf (dims,
48 sizeof (dims),
49 - "%dx%d",
50 - gif_file->SHeight,
51 + "%dx%d",
52 + gif_file->SHeight,
53 gif_file->SWidth);
54 if (0 !=
55 ec->proc (ec->cls,
56 @@ -111,7 +111,7 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
57 return;
58 while (1)
59 {
60 - if (GIF_OK !=
61 + if (GIF_OK !=
62 DGifGetRecordType (gif_file,
63 &gif_type))
64 break;
65 @@ -122,6 +122,8 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
66 if (GIF_OK !=
67 DGifGetExtension (gif_file, &et, &ext))
68 continue;
69 + if (NULL == ext)
70 + continue;
71 if (COMMENT_EXT_FUNC_CODE == et)
72 {
73 ec->proc (ec->cls,
74 @@ -133,7 +135,7 @@ EXTRACTOR_gif_extract_method (struct EXTRACTOR_ExtractContext *ec)
75 (uint8_t) ext[0]);
76 break;
77 }
78 - while ( (GIF_ERROR !=
79 + while ( (GIF_ERROR !=
80 DGifGetExtensionNext(gif_file, &ext)) &&
81 (NULL != ext) ) ; /* keep going */
82 }
83 diff --git a/src/plugins/it_extractor.c b/src/plugins/it_extractor.c
84 index 5b8a136..3d8803f 100644
85 --- a/src/plugins/it_extractor.c
86 +++ b/src/plugins/it_extractor.c
87 @@ -70,7 +70,7 @@ EXTRACTOR_it_extract_method (struct EXTRACTOR_ExtractContext *ec)
88 char itversion[8];
89 const struct Header *head;
90
91 - if (HEADER_SIZE >
92 + if ((ssize_t) HEADER_SIZE >
93 ec->read (ec->cls,
94 &data,
95 HEADER_SIZE))
96 @@ -90,9 +90,9 @@ EXTRACTOR_it_extract_method (struct EXTRACTOR_ExtractContext *ec)
97 return;
98
99 /* Version of Tracker */
100 - snprintf (itversion,
101 + snprintf (itversion,
102 sizeof (itversion),
103 - "%d.%d",
104 + "%d.%d",
105 (head->version[0] & 0x01),
106 head->version[1]);
107 if (0 != ec->proc (ec->cls,
108 diff --git a/src/plugins/nsfe_extractor.c b/src/plugins/nsfe_extractor.c
109 index 6a8be86..7369477 100644
110 --- a/src/plugins/nsfe_extractor.c
111 +++ b/src/plugins/nsfe_extractor.c
112 @@ -175,7 +175,7 @@ info_extract (struct EXTRACTOR_ExtractContext *ec,
113
114 if (size < 8)
115 return 0;
116 - if (size >
117 + if ((ssize_t) size >
118 ec->read (ec->cls,
119 &data,
120 size))
121 @@ -243,7 +243,7 @@ tlbl_extract (struct EXTRACTOR_ExtractContext *ec,
122 void *data;
123 const char *cdata;
124
125 - if (size >
126 + if ((ssize_t) size >
127 ec->read (ec->cls,
128 &data,
129 size))
130 @@ -285,7 +285,7 @@ auth_extract (struct EXTRACTOR_ExtractContext *ec,
131
132 if (left < 1)
133 return 0;
134 - if (size >
135 + if ((ssize_t) size >
136 ec->read (ec->cls,
137 &data,
138 size))
139 @@ -342,7 +342,7 @@ EXTRACTOR_nsfe_extract_method (struct EXTRACTOR_ExtractContext *ec)
140 uint32_t chunksize;
141 int ret;
142
143 - if (sizeof (struct header) >
144 + if ((ssize_t) sizeof (struct header) >
145 ec->read (ec->cls,
146 &data,
147 sizeof (struct header)))
148 diff --git a/src/plugins/s3m_extractor.c b/src/plugins/s3m_extractor.c
149 index 9cd6f8f..c4789ce 100644
150 --- a/src/plugins/s3m_extractor.c
151 +++ b/src/plugins/s3m_extractor.c
152 @@ -80,7 +80,7 @@ EXTRACTOR_s3m_extract_method (struct EXTRACTOR_ExtractContext *ec)
153 struct S3MHeader header;
154 char song_name_NT[29];
155
156 - if (sizeof (header) >
157 + if ((ssize_t) sizeof (header) >
158 ec->read (ec->cls,
159 &data,
160 sizeof (header)))
161 diff --git a/src/plugins/sid_extractor.c b/src/plugins/sid_extractor.c
162 index 571f677..dface42 100644
163 --- a/src/plugins/sid_extractor.c
164 +++ b/src/plugins/sid_extractor.c
165 @@ -116,7 +116,7 @@ struct header
166 /**
167 * Flags
168 */
169 - sidwrd flags;
170 + sidwrd flags;
171
172 /**
173 * Unknown.
174 @@ -176,7 +176,7 @@ EXTRACTOR_sid_extract_method (struct EXTRACTOR_ExtractContext *ec)
175 const struct header *head;
176 void *data;
177
178 - if (sizeof (struct header) >
179 + if ((ssize_t) sizeof (struct header) >
180 ec->read (ec->cls,
181 &data,
182 sizeof (struct header)))
183 @@ -193,7 +193,7 @@ EXTRACTOR_sid_extract_method (struct EXTRACTOR_ExtractContext *ec)
184
185 /* Version of SID format */
186 version = sidword (head->sidversion);
187 - snprintf (sidversion,
188 + snprintf (sidversion,
189 sizeof (sidversion),
190 "%d",
191 version);
192 @@ -208,7 +208,7 @@ EXTRACTOR_sid_extract_method (struct EXTRACTOR_ExtractContext *ec)
193 /* Get number of the first song to be played */
194 snprintf (startingsong,
195 sizeof (startingsong),
196 - "%d",
197 + "%d",
198 sidword (head->firstsong));
199 ADD (startingsong, EXTRACTOR_METATYPE_STARTING_SONG);
200
201 @@ -218,9 +218,9 @@ EXTRACTOR_sid_extract_method (struct EXTRACTOR_ExtractContext *ec)
202 ADD (album, EXTRACTOR_METATYPE_ALBUM);
203
204 memcpy (&artist, head->artist, 32);
205 - artist[32] = '\0';
206 + artist[32] = '\0';
207 ADD (artist, EXTRACTOR_METATYPE_ARTIST);
208 -
209 +
210 memcpy (&copyright, head->copyright, 32);
211 copyright[32] = '\0';
212 ADD (copyright, EXTRACTOR_METATYPE_COPYRIGHT);
213 @@ -236,24 +236,24 @@ EXTRACTOR_sid_extract_method (struct EXTRACTOR_ExtractContext *ec)
214 flags = sidword (head->flags);
215 /* MUS data */
216 if (0 != (flags & MUSPLAYER_FLAG))
217 - ADD ("Compute!'s Sidplayer", EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE);
218 + ADD ("Compute!'s Sidplayer", EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE);
219
220 /* PlaySID data */
221 if (0 != (flags & PLAYSID_FLAG))
222 - ADD ("PlaySID", EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE);
223 + ADD ("PlaySID", EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE);
224
225
226 /* PAL or NTSC */
227 if (0 != (flags & NTSC_FLAG))
228 - ADD ("PAL/NTSC", EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM);
229 + ADD ("PAL/NTSC", EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM);
230 else if (0 != (flags & PAL_FLAG))
231 - ADD ("PAL", EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM);
232 + ADD ("PAL", EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM);
233
234 /* Detect SID Chips suitable for play the files */
235 if (0 != (flags & MOS8580_FLAG))
236 - ADD ("MOS6581/MOS8580", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
237 + ADD ("MOS6581/MOS8580", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
238 else if (0 != (flags & MOS6581_FLAG))
239 - ADD ("MOS6581", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
240 + ADD ("MOS6581", EXTRACTOR_METATYPE_TARGET_ARCHITECTURE);
241 }
242
243 /* end of sid_extractor.c */
244 diff --git a/src/plugins/xm_extractor.c b/src/plugins/xm_extractor.c
245 index a1aea27..d0b62bd 100644
246 --- a/src/plugins/xm_extractor.c
247 +++ b/src/plugins/xm_extractor.c
248 @@ -70,7 +70,7 @@ EXTRACTOR_xm_extract_method (struct EXTRACTOR_ExtractContext *ec)
249 char xmversion[8];
250 size_t n;
251
252 - if (sizeof (struct Header) >
253 + if ((ssize_t) sizeof (struct Header) >
254 ec->read (ec->cls,
255 &data,
256 sizeof (struct Header)))
257 @@ -81,9 +81,9 @@ EXTRACTOR_xm_extract_method (struct EXTRACTOR_ExtractContext *ec)
258 return;
259 ADD("audio/x-xm", EXTRACTOR_METATYPE_MIMETYPE);
260 /* Version of Tracker */
261 - snprintf (xmversion,
262 + snprintf (xmversion,
263 sizeof (xmversion),
264 - "%d.%d",
265 + "%d.%d",
266 head->version[1],
267 head->version[0]);
268 ADD (xmversion, EXTRACTOR_METATYPE_FORMAT_VERSION);
269 @@ -99,7 +99,7 @@ EXTRACTOR_xm_extract_method (struct EXTRACTOR_ExtractContext *ec)
270 n = 19;
271 while ( (n > 0) && isspace ((unsigned char) tracker[n]))
272 n--;
273 - tracker[n + 1] = '\0';
274 + tracker[n + 1] = '\0';
275 ADD (tracker, EXTRACTOR_METATYPE_CREATED_BY_SOFTWARE);
276 return;
277 }
278 --
279 cgit v1.1
280

  ViewVC Help
Powered by ViewVC 1.1.30