[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. 99ae9353f6834da0cb73f59f4b32d1f0ae1263fa

Stephen Gran steve at lobefin.net
Thu Sep 4 12:36:50 UTC 2008


The following commit has been merged in the debian/unstable branch:
commit 3390a12e33e67fa7fdd7bd0cf1d08048501aff49
Author: Stephen Gran <steve at lobefin.net>
Date:   Thu Sep 4 13:25:27 2008 +0100

    Revert "revert last commit"
    
    This reverts commit 45a2e0126bdb0457786a8e20d753f2ed802e93e5.

diff --git a/ChangeLog b/ChangeLog
index 8263a05..a4e2a00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,3 @@
-Tue May 27 22:21:40 CEST 2008 (acab)
-------------------------------------
-  * libclamav/ole2_extract.c: revert last commit
-
 Tue May 27 21:37:39 CEST 2008 (acab)
 ------------------------------------
   * libclamav/ole2_extract.c: use cli_unlink
diff --git a/libclamav/ole2_extract.c b/libclamav/ole2_extract.c
index 07e8230..c65801b 100644
--- a/libclamav/ole2_extract.c
+++ b/libclamav/ole2_extract.c
@@ -781,7 +781,7 @@ static int handler_otf(int fd, ole2_header_t *hdr, property_t *prop, const char
   buff = (unsigned char *) cli_malloc(1 << hdr->log2_big_block_size);
   if (!buff) {
     close(ofd);
-    unlink(tempfile);
+    cli_unlink(tempfile);
     free(tempfile);
     return CL_EMEM;
   }
@@ -792,7 +792,10 @@ static int handler_otf(int fd, ole2_header_t *hdr, property_t *prop, const char
     cli_errmsg("OLE2: OTF handler init bitset failed\n");
     free(buff);
     close(ofd);
-    unlink(tempfile);
+    if (cli_unlink(tempfile)) {
+        free(tempfile);
+	return CL_EIO;
+    }
     free(tempfile);
     return CL_BREAK;
   }
@@ -823,7 +826,10 @@ static int handler_otf(int fd, ole2_header_t *hdr, property_t *prop, const char
 	close(ofd);
 	free(buff);
 	cli_bitset_free(blk_bitset);
-	unlink(tempfile);
+	if (cli_unlink(tempfile)) {
+	  free(tempfile);
+	  return CL_EIO;
+        }
 	free(tempfile);
 	return CL_BREAK;
       }
@@ -840,7 +846,10 @@ static int handler_otf(int fd, ole2_header_t *hdr, property_t *prop, const char
 	close(ofd);
 	free(buff);
 	cli_bitset_free(blk_bitset);
-	unlink(tempfile);
+	if (cli_unlink(tempfile)) {
+	  free(tempfile);
+	  return CL_EIO;
+        }
 	free(tempfile);
 	return CL_EIO;
       }
@@ -855,8 +864,12 @@ static int handler_otf(int fd, ole2_header_t *hdr, property_t *prop, const char
   close(ofd);
   free(buff);
   cli_bitset_free(blk_bitset);
-  if(!cli_leavetemps_flag)
-    unlink(tempfile);
+  if(!cli_leavetemps_flag) {
+    if (cli_unlink(tempfile)) {
+      free(tempfile);
+      return CL_EIO;
+    }
+  }
   free(tempfile);
   return ret==CL_VIRUS ? CL_VIRUS : CL_SUCCESS;
 

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list