Browse code

libclamav/pe_icons.c: introduce LOGPARSEICONDETAILS define to reduce parseicon logging in default build

David Raynor authored on 2013/03/01 03:59:45
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Feb 28 13:55:04 EDT 2013 (dar)
2
+------------------------------------
3
+ * libclamav/pe_icons.c: introduce LOGPARSEICONDETAILS define to reduce parseicon logging in default build
4
+
1 5
 Wed Feb 20 10:05:00 EDT 2013 (multiple)
2 6
 ------------------------------------
3 7
  * Bug reported by Felix Groebert, Mateusz Jurczyk and Gynvael Coldwind of the
... ...
@@ -38,6 +38,8 @@
38 38
 #define LABDIFF(x) labdiff2(x)
39 39
 #endif
40 40
 
41
+/* #define LOGPARSEICONDETAILS */
42
+
41 43
 struct GICONS {
42 44
     unsigned int cnt;
43 45
     uint32_t lastg;
... ...
@@ -1499,6 +1501,7 @@ static int parseicon(icon_groupset *set, uint32_t rva, cli_ctx *ctx, struct cli_
1499 1499
 	} else
1500 1500
 	    confidence = (color + (gray + bright + noedge)*2/3 + dark + edge + colors) / 6;
1501 1501
 
1502
+#ifdef LOGPARSEICONDETAILS
1502 1503
 	cli_dbgmsg("parseicon: edge confidence: %u%%\n", edge);
1503 1504
 	cli_dbgmsg("parseicon: noedge confidence: %u%%\n", noedge);
1504 1505
 	if(!bwmatch) {
... ...
@@ -1509,6 +1512,7 @@ static int parseicon(icon_groupset *set, uint32_t rva, cli_ctx *ctx, struct cli_
1509 1509
 	cli_dbgmsg("parseicon: dark confidence: %u%%\n", dark);
1510 1510
 	if(!bwmatch)
1511 1511
 	    cli_dbgmsg("parseicon: spread confidence: red %u%%, green %u%%, blue %u%% - colors %u%%\n", reds, greens, blues, ccount);
1512
+#endif
1512 1513
 
1513 1514
 	if(confidence >= positivematch) {
1514 1515
 	    cli_dbgmsg("confidence: %u\n", confidence);