186{
190
196 int zlib_ret;
197
199 ("[VFD] VfdExtractImz - IN\n"));
200
202 *pLength = 0;
203
204
205
206
207
208
211
214
216 }
217
220
222
225
227 }
228
230
231
232
234
236 ("[VFD] PKZIP header signature not found.\n"));
237
239 }
240
241
242
244
246 ("[VFD] Bad PKZIP compression method.\n"));
247
249 }
250
252
253
255 ("[VFD] PKZIP encrypted.\n"));
256
258 }
259
260
261
264
278 break;
279
280 default:
282 ("[VFD] Unsupported image size %lu.\n",
284
286 }
287
288
289
290
291
295
297 ("[VFD] PKZIP header too long.\n"));
298
300 }
301
302
303
305
306 if (!file_cache) {
307
309 ("[VFD] Failed to allocate file cache.\n"));
310
312 }
313
314
315
317
318
319
322
326
327
328
329 stream.next_out = file_cache;
331
333
334
335
336
337
338
339
340
341
342 if (zlib_ret !=
Z_OK) {
344
346 ("[VFD] inflateInit2() failed - %s.\n",
347 ZLIB_ERROR(zlib_ret)));
348
350 }
351
352 for (;;) {
353
354
355
357
358 if (zlib_ret !=
Z_OK) {
361 }
362 else {
364 ("[VFD] inflate() failed - %s.\n",
365 ZLIB_ERROR(zlib_ret)));
366
368 }
369 break;
370 }
371
373
374
376 break;
377 }
378
379 if (
stream.total_in >= compressed) {
380
382 break;
383 }
384
385
386
389
391
393 ("[VFD] Read compressed data - %s.\n",
395 break;
396 }
397
400 }
401
402
403
405
406
407
411 }
412 else {
414 }
415
417 ("[VFD] VfdExtractImz - OUT\n"));
418
420}
#define ERROR_INVALID_FUNCTION
#define ReadFile(a, b, c, d, e)
#define ERROR_NOT_SUPPORTED
int inflate(z_streamp strm, int flush)
int inflateEnd(z_streamp strm)
GLenum GLuint GLenum GLsizei const GLchar * buf
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
static const BYTE uncompressed[]
#define inflateInit2(strm, windowBits)
#define FIELD_OFFSET(t, f)
#define VFDTRACE(LEVEL, STRING)
#define VFD_BYTES_PER_SECTOR
#define VFD_SECTOR_TO_BYTE(s)
PCSTR SystemMessage(DWORD nError)
struct _zip_local_file_header * PZIP_HEADER
#define ZIP_LOCAL_SIGNATURE
DWORD WINAPI GetLastError(void)
#define ERROR_INVALID_DATA