From c2cbcd8d98ae8e1b8d1ef06bc6dc53f77ac3bd16 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 9 Feb 2016 16:43:40 +0000 Subject: Fix some issues found by coverity --- src/lua/lua_regexp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lua/lua_regexp.c') 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; -- cgit v1.2.3