diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-09 15:00:54 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-01-09 15:00:54 +0000 |
commit | 0255fbd77eb56ec6b78c69d278f7bc138e978e3a (patch) | |
tree | 5d269ad1ad9bbbad34bb421271c83a55b6bba91a /src/lua | |
parent | 6fe589b312379fc70cc7ce1ac5539dc624ce367c (diff) | |
download | rspamd-0255fbd77eb56ec6b78c69d278f7bc138e978e3a.tar.gz rspamd-0255fbd77eb56ec6b78c69d278f7bc138e978e3a.zip |
[Fix] More fixes in html tag content calculations
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_html.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua/lua_html.c b/src/lua/lua_html.c index 43c34797c..c0e07de36 100644 --- a/src/lua/lua_html.c +++ b/src/lua/lua_html.c @@ -663,7 +663,7 @@ lua_html_tag_get_content (lua_State *L) struct rspamd_lua_text *t; if (ltag) { - if (ltag->html && ltag->tag->content_offset && ltag->tag->content_length && + if (ltag->html && ltag->tag->content_length && ltag->html->parsed->len >= ltag->tag->content_offset + ltag->tag->content_length) { t = lua_newuserdata (L, sizeof (*t)); rspamd_lua_setclass (L, "rspamd{text}", -1); |