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

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


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

    Revert "don't return CL_EMAX* error codes to applications (bb#1001)"
    
    This reverts commit 71fad61e3511605c31395ecd7358fa2a54200e11.

diff --git a/ChangeLog b/ChangeLog
index 52f1426..f671b14 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,3 @@
-Mon Apr 28 16:13:33 CEST 2008 (tk)
-----------------------------------
-  * libclamav/scanners.c: don't return CL_EMAX* error codes to
-			  applications (bb#1001)
-
 Mon Apr 28 13:48:36 CEST 2008 (tk)
 ----------------------------------
   * clamscan/manager.c: print information about clean files when the RAR
diff --git a/libclamav/clamav.h b/libclamav/clamav.h
index cf8720e..9929b75 100644
--- a/libclamav/clamav.h
+++ b/libclamav/clamav.h
@@ -37,9 +37,9 @@ extern "C"
 #define CL_SUCCESS	CL_CLEAN
 #define CL_BREAK	2
 
-#define CL_EMAXREC	-100 /* (internal) recursion limit exceeded */
-#define CL_EMAXSIZE	-101 /* (internal) size limit exceeded */
-#define CL_EMAXFILES	-102 /* (internal) files limit exceeded */
+#define CL_EMAXREC	-100 /* recursion limit exceeded */
+#define CL_EMAXSIZE	-101 /* size limit exceeded */
+#define CL_EMAXFILES	-102 /* files limit exceeded */
 #define CL_ERAR		-103 /* rar handler error */
 #define CL_EZIP		-104 /* zip handler error */
 #define CL_EGZIP	-105 /* gzip handler error */
@@ -61,7 +61,7 @@ extern "C"
 #define CL_EMD5		-121 /* MD5 verification error */
 #define CL_EDSIG	-122 /* digital signature verification error */
 #define CL_EIO		-123 /* general I/O error */
-#define CL_EFORMAT	-124 /* (internal) bad format or broken file */
+#define CL_EFORMAT	-124 /* bad format or broken file */
 #define CL_ESUPPORT	-125 /* not supported data format */
 #define CL_ELOCKDB	-126 /* can't lock DB directory */
 #define CL_EARJ         -127 /* ARJ handler error */
diff --git a/libclamav/scanners.c b/libclamav/scanners.c
index 9e1e991..b52e903 100644
--- a/libclamav/scanners.c
+++ b/libclamav/scanners.c
@@ -1951,15 +1951,11 @@ int cli_magic_scandesc(int desc, cli_ctx *ctx)
     }
     ctx->recursion--;
 
-    switch(ret) {
-	case CL_EFORMAT:
-	case CL_EMAXREC:
-	case CL_EMAXSIZE:
-	case CL_EMAXFILES:
-	    cli_dbgmsg("Descriptor[%d]: %s\n", desc, cl_strerror(ret));
-	    return CL_CLEAN;
-	default:
-	    return ret;
+    if(ret == CL_EFORMAT) {
+	cli_dbgmsg("Descriptor[%d]: %s\n", desc, cl_strerror(CL_EFORMAT));
+	return CL_CLEAN;
+    } else {
+	return ret;
     }
 }
 

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list