aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_fann.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-15 20:23:35 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-15 20:23:35 +0000
commit0e270dbe709e743ec840999c05e35f4d63be69b4 (patch)
tree810753d3258d55c35efc599f279d560accb6fe40 /src/lua/lua_fann.c
parente0446369d13269d07cecb5711fbab7d7bc64398a (diff)
downloadrspamd-0e270dbe709e743ec840999c05e35f4d63be69b4.tar.gz
rspamd-0e270dbe709e743ec840999c05e35f4d63be69b4.zip
[Fix] Fix couple of issues
Found by: Coverity
Diffstat (limited to 'src/lua/lua_fann.c')
-rw-r--r--src/lua/lua_fann.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lua/lua_fann.c b/src/lua/lua_fann.c
index ba57b414a..884a40293 100644
--- a/src/lua/lua_fann.c
+++ b/src/lua/lua_fann.c
@@ -213,6 +213,8 @@ rspamd_fann_create_train (guint num_data, guint num_input, guint num_output)
fann_type *inp, *outp;
guint i;
+ g_assert (num_data > 0 && num_input > 0 && num_output > 0);
+
t = calloc (1, sizeof (*t));
g_assert (t != NULL);