diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-02 14:09:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-04-02 14:26:34 +0100 |
commit | c09696d74506cf9bb54a8a5b792f7686e7cb9788 (patch) | |
tree | b58fd2163dc24d7df6483007b22ec5819e6eaad1 | |
parent | 399eeb77c76eca2d87fed0616d3df384ff6332f3 (diff) | |
download | rspamd-c09696d74506cf9bb54a8a5b792f7686e7cb9788.tar.gz rspamd-c09696d74506cf9bb54a8a5b792f7686e7cb9788.zip |
More fixes to normalization.
-rw-r--r-- | src/libmime/message.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index 3472c70c1..cbb2d8d31 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -1178,7 +1178,7 @@ rspamd_normalize_text_part (struct rspamd_task *task, struct mime_text_part *part) { struct sb_stemmer *stem = NULL; - rspamd_fstring_t *w, stw; + rspamd_fstring_t *w; const guchar *r; guint i, nlen; GArray *tmp; @@ -1205,16 +1205,16 @@ rspamd_normalize_text_part (struct rspamd_task *task, if (stem != NULL && r != NULL) { nlen = strlen (r); - nlen = MIN (nlen, stw.len); - memcpy (stw.begin, r, nlen); - stw.len = nlen; + nlen = MIN (nlen, w->len); + memcpy (w->begin, r, nlen); + w->len = nlen; } else { if (part->is_utf) { - rspamd_str_lc_utf8 (stw.begin, stw.len); + rspamd_str_lc_utf8 (w->begin, w->len); } else { - rspamd_str_lc (stw.begin, stw.len); + rspamd_str_lc (w->begin, w->len); } } } |