diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-11-18 17:50:19 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-11-18 17:50:19 +0000 |
commit | 87ef9084fbc26218762f7b9a90522507543d142a (patch) | |
tree | a99d8c1b90803166a10ec872467a47adf9076e35 /src/lua/lua_text.c | |
parent | d6de1382a4e2c0ff723f1ee65c8e64c81fb0a76c (diff) | |
download | rspamd-87ef9084fbc26218762f7b9a90522507543d142a.tar.gz rspamd-87ef9084fbc26218762f7b9a90522507543d142a.zip |
[Fix] Fix off-by-one with init check
Diffstat (limited to 'src/lua/lua_text.c')
-rw-r--r-- | src/lua/lua_text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_text.c b/src/lua/lua_text.c index 99b8b8151..dbbba9838 100644 --- a/src/lua/lua_text.c +++ b/src/lua/lua_text.c @@ -1358,7 +1358,7 @@ lua_text_find (lua_State *L) init = relative_pos_start (lua_tointeger (L, 3), t->len); } - if (init >= t->len) { + if (init > t->len) { return luaL_error (L, "invalid arguments to find: init too large"); } |