git-svn: trunk@1991
Tomasz Kojm authored on 2006/05/27 20:52:33... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Sat May 27 13:50:42 CEST 2006 (tk) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/scanners.c: fix logic bug in new code |
|
4 |
+ Reported by aCaB and Sven |
|
5 |
+ |
|
1 | 6 |
Wed May 24 14:04:56 CEST 2006 (acab) |
2 | 7 |
------------------------------------ |
3 | 8 |
* libclamav/upx.c: Fixed macro typo reported by Andy Fiddaman. |
... | ... |
@@ -428,8 +428,8 @@ static int cli_scanzip(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_c |
428 | 428 |
if(!swarning) { |
429 | 429 |
cli_warnmsg("Not supported compression method in one or more files\n"); |
430 | 430 |
swarning = 1; |
431 |
- continue; |
|
432 | 431 |
} |
432 |
+ continue; |
|
433 | 433 |
} else { |
434 | 434 |
cli_dbgmsg("Zip: Can't open file %s\n", zdirent.d_name); |
435 | 435 |
ret = CL_EZIP; |
... | ... |
@@ -343,11 +343,18 @@ int zip_dir_read(zip_dir *dir, zip_dirent *d) |
343 | 343 |
|
344 | 344 |
int zip_file_close(zip_file *fp) |
345 | 345 |
{ |
346 |
- zip_dir *dir = fp->dir; |
|
346 |
+ zip_dir *dir; |
|
347 |
+ |
|
348 |
+ |
|
349 |
+ if(!fp) { |
|
350 |
+ cli_errmsg("Unzip: zip_file_close: fp == NULL\n"); |
|
351 |
+ return CL_ENULLARG; |
|
352 |
+ } |
|
347 | 353 |
|
348 | 354 |
if(fp->method) |
349 | 355 |
inflateEnd(&fp->d_stream); |
350 | 356 |
|
357 |
+ dir = fp->dir; |
|
351 | 358 |
if(fp->buf32k) { |
352 | 359 |
if(!dir->cache.buf32k) |
353 | 360 |
dir->cache.buf32k = fp->buf32k; |