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

Stephen Gran steve at lobefin.net
Thu Sep 4 12:37:03 UTC 2008


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

    Revert "downgrade some error messages (bb#911, bb#798)"
    
    This reverts commit 2f12e3e8105b151daebba39e6c097c62a9c60afe.

diff --git a/ChangeLog b/ChangeLog
index 156596e..5b42aef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,3 @@
-Mon Apr  7 11:15:49 CEST 2008 (tk)
-----------------------------------
-  * libclamav/chmunpack.c,cab.c: downgrade some error messages (bb#911, bb#798)
-
 Sun Apr  6 12:33:25 CEST 2008 (acab)
 ------------------------------------
   * libclamav/pe.c: make petite softfail as it's really reading unaligned data
diff --git a/libclamav/cab.c b/libclamav/cab.c
index 4773723..03d713b 100644
--- a/libclamav/cab.c
+++ b/libclamav/cab.c
@@ -122,8 +122,7 @@ static char *cab_readstr(int fd, int *ret)
     }
 
     if(lseek(fd, (off_t) (pos + i + 1), SEEK_SET) == -1) {
-	/* *ret = CL_EIO; */
-	*ret = CL_EFORMAT; /* most likely a corrupted file */
+	*ret = CL_EIO;
 	return NULL;
     }
 
@@ -210,8 +209,7 @@ int cab_open(int fd, off_t offset, struct cab_archive *cab)
 
     if(cli_readn(fd, &hdr, sizeof(hdr)) != sizeof(hdr)) {
 	cli_dbgmsg("cab_open: Can't read cabinet header\n");
-	/* return CL_EIO; */
-	return CL_EFORMAT; /* most likely a corrupted file */
+	return CL_EIO;
     }
 
     if(EC32(hdr.signature) != 0x4643534d) {
@@ -270,8 +268,7 @@ int cab_open(int fd, off_t offset, struct cab_archive *cab)
     if(cab->flags & 0x0004) {
 	if(cli_readn(fd, &hdr_opt, sizeof(hdr_opt)) != sizeof(hdr_opt)) {
 	    cli_dbgmsg("cab_open: Can't read file header (fake cab?)\n");
-	    /* return CL_EIO; */
-	    return CL_EFORMAT; /* most likely a corrupted file */
+	    return CL_EIO;
 	}
 
 	cab->reshdr = EC16(hdr_opt.cbCFHeader);
@@ -281,8 +278,7 @@ int cab_open(int fd, off_t offset, struct cab_archive *cab)
 	if(cab->reshdr) {
 	    if(lseek(fd, cab->reshdr, SEEK_CUR) == -1) {
 		cli_dbgmsg("cab_open: Can't lseek to %u (fake cab?)\n", cab->reshdr);
-		/* return CL_EIO; */
-		return CL_EFORMAT; /* most likely a corrupted file */
+		return CL_EIO;
 	    }
 	}
     }
@@ -340,16 +336,14 @@ int cab_open(int fd, off_t offset, struct cab_archive *cab)
 	if(cli_readn(fd, &folder_hdr, sizeof(folder_hdr)) != sizeof(folder_hdr)) {
 	    cli_errmsg("cab_open: Can't read header for folder %u\n", i);
 	    cab_free(cab);
-	    /* return CL_EIO; */
-	    return CL_EFORMAT; /* most likely a corrupted file */
+	    return CL_EIO;
 	}
 
 	if(resfold) {
 	    if(lseek(fd, resfold, SEEK_CUR) == -1) {
 		cli_errmsg("cab_open: Can't lseek to %u (resfold)\n", (unsigned int) resfold);
 		cab_free(cab);
-		/* return CL_EIO; */
-		return CL_EFORMAT; /* most likely a corrupted file */
+		return CL_EIO;
 	    }
 	}
 
@@ -398,8 +392,7 @@ int cab_open(int fd, off_t offset, struct cab_archive *cab)
 	if(cli_readn(fd, &file_hdr, sizeof(file_hdr)) != sizeof(file_hdr)) {
 	    cli_errmsg("cab_open: Can't read file %u header\n", i);
 	    cab_free(cab);
-	    /* return CL_EIO; */
-	    return CL_EFORMAT; /* most likely a corrupted file */
+	    return CL_EIO;
 	}
 
 	file = (struct cab_file *) cli_calloc(1, sizeof(struct cab_file));
@@ -490,14 +483,12 @@ static int cab_read_block(int fd, struct cab_state *state, uint16_t resdata)
 
     if(cli_readn(fd, &block_hdr, sizeof(block_hdr)) != sizeof(block_hdr)) {
 	cli_dbgmsg("cab_read_block: Can't read block header\n");
-	/* return CL_EIO; */
-	return CL_EFORMAT; /* most likely a corrupted file */
+	return CL_EIO;
     }
 
     if(resdata && lseek(fd, (off_t) resdata, SEEK_CUR) == -1) {
 	cli_dbgmsg("cab_read_block: lseek failed\n");
-	/* return CL_EIO; */
-	return CL_EFORMAT; /* most likely a corrupted file */
+	return CL_EIO;
     }
 
     state->blklen = EC16(block_hdr.cbData);
@@ -515,8 +506,7 @@ static int cab_read_block(int fd, struct cab_state *state, uint16_t resdata)
 
     if(cli_readn(fd, state->block, state->blklen) != state->blklen) {
 	cli_dbgmsg("cab_read_block: Can't read block data\n");
-	/* return CL_EIO; */
-	return CL_EFORMAT; /* most likely a corrupted file */
+	return CL_EIO;
     }
 
     state->pt = state->end = state->block;
diff --git a/libclamav/chmunpack.c b/libclamav/chmunpack.c
index c942f5c..823a735 100644
--- a/libclamav/chmunpack.c
+++ b/libclamav/chmunpack.c
@@ -825,8 +825,7 @@ int cli_chm_extract_file(int fd, char *dirname, chm_metadata_t *metadata)
 	if (chm_copy_file_data(metadata->ufd, metadata->ofd, metadata->file_length) != metadata->file_length) {
 		cli_dbgmsg("failed to copy %lu bytes\n", (unsigned long int) metadata->file_length);
 		close(metadata->ofd);
-		/* return CL_EIO; */
-		return CL_EFORMAT; /* most likely a corrupted file */
+		return CL_EIO;
 	}
 		
 	return CL_SUCCESS;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list