aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-09 16:43:40 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-02-09 16:43:40 +0000
commitc2cbcd8d98ae8e1b8d1ef06bc6dc53f77ac3bd16 (patch)
treee8742046ad3eac446a64576f9bfd605e583e9ee5 /src/lua/lua_regexp.c
parentdcbe3146b882a731e1cd82025607bd423bb82024 (diff)
downloadrspamd-c2cbcd8d98ae8e1b8d1ef06bc6dc53f77ac3bd16.tar.gz
rspamd-c2cbcd8d98ae8e1b8d1ef06bc6dc53f77ac3bd16.zip
Fix some issues found by coverity
Diffstat (limited to 'src/lua/lua_regexp.c')
-rw-r--r--src/lua/lua_regexp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index 615062bf2..9bd387a4b 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -610,6 +610,12 @@ lua_regexp_split (lua_State *L)
}
else if (lua_type (L, 2) == LUA_TUSERDATA) {
t = lua_check_text (L, 2);
+
+ if (t == NULL) {
+ lua_error (L);
+ return 0;
+ }
+
data = t->start;
len = t->len;
is_text = TRUE;