Merging r195646:
------------------------------------------------------------------------
r195646 | rengolin | 2013-11-25 07:00:27 -0800 (Mon, 25 Nov 2013) | 1 line

Work-around for ClamAV uncertainty in test-suite
------------------------------------------------------------------------

llvm-svn: 195738
diff --git a/MultiSource/Applications/ClamAV/clamscan.reference_output b/MultiSource/Applications/ClamAV/clamscan.reference_output
index 5f9b943..1cf8b52 100644
--- a/MultiSource/Applications/ClamAV/clamscan.reference_output
+++ b/MultiSource/Applications/ClamAV/clamscan.reference_output
@@ -283,8 +283,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -942,8 +940,6 @@
 Scanning clam.exe
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1035,8 +1031,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1303,12 +1297,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1404,8 +1394,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1692,12 +1680,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1964,12 +1948,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -2320,12 +2300,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -2421,8 +2397,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -2582,8 +2556,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
diff --git a/MultiSource/Applications/ClamAV/clamscan.reference_output.big-endian b/MultiSource/Applications/ClamAV/clamscan.reference_output.big-endian
index f0ca679..9aefbe5 100644
--- a/MultiSource/Applications/ClamAV/clamscan.reference_output.big-endian
+++ b/MultiSource/Applications/ClamAV/clamscan.reference_output.big-endian
@@ -281,8 +281,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -940,8 +938,6 @@
 Scanning clam.exe
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1033,8 +1029,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1301,12 +1295,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1402,8 +1392,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1690,12 +1678,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -1962,12 +1946,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -2318,12 +2298,8 @@
 
 Open WordDocument failed
 
-Matched signature for file type %s
-
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -2419,8 +2395,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
@@ -2580,8 +2554,6 @@
 
 Recognized %s file
 
-Matched signature for file type %s
-
 e_lfanew == %d
 
 Machine type: 80386
diff --git a/MultiSource/Applications/ClamAV/libclamav_matcher-ac.c b/MultiSource/Applications/ClamAV/libclamav_matcher-ac.c
index 6b8a63f..59a01b9 100644
--- a/MultiSource/Applications/ClamAV/libclamav_matcher-ac.c
+++ b/MultiSource/Applications/ClamAV/libclamav_matcher-ac.c
@@ -634,7 +634,8 @@
 				if(pt->type) {
 				    if(otfrec) {
 					if(pt->type > type || pt->type >= CL_TYPE_SFX || pt->type == CL_TYPE_MSEXE) {
-					    cli_dbgmsg("Matched signature for file type %s\n", pt->virname);
+					    /* This debug message was causing trouble on the test-suite for being non-deterministic */
+ 					    /*cli_dbgmsg("Matched signature for file type %s\n", pt->virname);*/
 					    type = pt->type;
 					    if(ftoffset && (!*ftoffset || (*ftoffset)->cnt < MAX_EMBEDDED_OBJ) && ((ftype == CL_TYPE_MSEXE && type >= CL_TYPE_SFX) || ((ftype == CL_TYPE_MSEXE || ftype == CL_TYPE_ZIP) && type == CL_TYPE_MSEXE)))  {
 						/* FIXME: we don't know which offset of the first part is the correct one */