diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-15 20:23:35 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-15 20:23:35 +0000 |
commit | 0e270dbe709e743ec840999c05e35f4d63be69b4 (patch) | |
tree | 810753d3258d55c35efc599f279d560accb6fe40 /src/lua/lua_fann.c | |
parent | e0446369d13269d07cecb5711fbab7d7bc64398a (diff) | |
download | rspamd-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.c | 2 |
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); |