Browse code

cli_unrar_close() was being called too early

git-svn: trunk@2636

Tomasz Kojm authored on 2007/01/20 20:38:54
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sat Jan 20 12:36:53 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav/scanners.c: cli_unrar_close() was being called too early
4
+
1 5
 Fri Jan 19 19:48:29 GMT 2007 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/pdf.c:	Improved error messages
... ...
@@ -278,12 +278,13 @@ static int cli_scanrar(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_c
278 278
     if(ret == CL_BREAK)
279 279
 	ret = CL_CLEAN;
280 280
 
281
-    cli_unrar_close(&rar_state);
282 281
     metadata = metadata_tmp = rar_state.metadata; 
283 282
 
284 283
     if(cli_scandir(rar_state.comment_dir, ctx) == CL_VIRUS)
285 284
 	ret = CL_VIRUS;
286 285
 
286
+    cli_unrar_close(&rar_state);
287
+
287 288
     if(!cli_leavetemps_flag)
288 289
         cli_rmdirs(dir);
289 290