aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-09 18:47:50 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-09 18:47:50 +0000
commitf42c8595b9a0bf8a56b3bef9154b23b6ab62ac8f (patch)
treed9e3687a403b1549a7277b92a1e430a70d585672
parent3fc07e7cbbeb9470a27d4d011a88a08f0dddb668 (diff)
downloadrspamd-f42c8595b9a0bf8a56b3bef9154b23b6ab62ac8f.tar.gz
rspamd-f42c8595b9a0bf8a56b3bef9154b23b6ab62ac8f.zip
[Minor] Adopt plugin
-rw-r--r--src/plugins/fuzzy_check.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 1f3561706..a6f287e7b 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -1324,10 +1324,15 @@ fuzzy_cmd_from_image_part (struct fuzzy_rule *rule,
if (sh != NULL) {
memcpy (&shcmd->sgl, sh->hashes, sizeof (shcmd->sgl));
shcmd->basic.shingles_count = RSPAMD_SHINGLE_SIZE;
+#if 0
+ for (unsigned int i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) {
+ msg_err ("shingle %d: %L", i, sh->hashes[i]);
+ }
+#endif
}
rspamd_cryptobox_hash (shcmd->basic.digest,
- (const guchar *)img->dct, sizeof (gdouble) * 64 * 64,
+ (const guchar *)img->dct, RSPAMD_DCT_LEN / NBBY,
rule->hash_key->str, rule->hash_key->len);
msg_debug_pool ("loading shingles of type %s with key %*xs",