aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstat/classifiers/lua_classifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstat/classifiers/lua_classifier.c')
-rw-r--r--src/libstat/classifiers/lua_classifier.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstat/classifiers/lua_classifier.c b/src/libstat/classifiers/lua_classifier.c
index a28b58d84..823f689d5 100644
--- a/src/libstat/classifiers/lua_classifier.c
+++ b/src/libstat/classifiers/lua_classifier.c
@@ -151,8 +151,7 @@ lua_classifier_classify (struct rspamd_classifier *cl,
for (i = 0; i < tokens->len; i ++) {
tok = g_ptr_array_index (tokens, i);
- v = 0;
- memcpy (&v, tok->data, MIN (sizeof (v), tok->datalen));
+ v = tok->data;
lua_createtable (L, 3, 0);
/* High word, low word, order */
lua_pushnumber (L, (guint32)(v >> 32));
@@ -208,7 +207,7 @@ lua_classifier_learn_spam (struct rspamd_classifier *cl,
for (i = 0; i < tokens->len; i ++) {
tok = g_ptr_array_index (tokens, i);
v = 0;
- memcpy (&v, tok->data, MIN (sizeof (v), tok->datalen));
+ v = tok->data;
lua_createtable (L, 3, 0);
/* High word, low word, order */
lua_pushnumber (L, (guint32)(v >> 32));