aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/shingles.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-25 14:52:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-12-25 14:52:37 +0000
commitde8ca5b3ac969491416a064840f963622fd3d59c (patch)
treebb18db8d4ee8892257ebc5e9bd1c62eb6ccf2479 /src/libutil/shingles.c
parent8b24e979107b29276c0d306296475d2c5feb88e8 (diff)
downloadrspamd-de8ca5b3ac969491416a064840f963622fd3d59c.tar.gz
rspamd-de8ca5b3ac969491416a064840f963622fd3d59c.zip
[Fix] Try to fix race condition in redis_pool
Diffstat (limited to 'src/libutil/shingles.c')
-rw-r--r--src/libutil/shingles.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libutil/shingles.c b/src/libutil/shingles.c
index 4f2e85fa1..b2990de63 100644
--- a/src/libutil/shingles.c
+++ b/src/libutil/shingles.c
@@ -115,7 +115,6 @@ rspamd_shingles_from_text (GArray *input,
}
memset (res, 0, sizeof (res));
-
for (i = 0; i <= (gint)input->len; i ++) {
if (i - beg >= SHINGLES_WINDOW || i == (gint)input->len) {
@@ -248,7 +247,7 @@ rspamd_shingles_from_image (guchar *dct,
beg++;
}
-
+#undef INNER_CYCLE_SHINGLES
/* Now we need to filter all hashes and make a shingles result */
for (i = 0; i < RSPAMD_SHINGLE_SIZE; i ++) {
shingle->hashes[i] = filter (hashes[i], hlen,