This website works better with JavaScript.
Home
Explore
Help
Sign In
mirrors
/
rspamd
mirror of
https://github.com/vstakhov/rspamd.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
159
Wiki
Activity
Browse Source
[Minor] Lua_text: Sanitize span length
tags/2.3
Vsevolod Stakhov
4 years ago
parent
9bad1e7d1c
commit
01dd389504
1 changed files
with
2 additions
and
1 deletions
Split View
Show Diff Stats
2
1
src/lua/lua_text.c
+ 2
- 1
src/lua/lua_text.c
View File
@@ -460,7 +460,8 @@ lua_text_span (lua_State *L)
if (len == -1) {
len = t->len - (start - 1);
}
else if (len > (t->len - (start - 1))) {
if (len < 0 || (len > (t->len - (start - 1)))) {
return luaL_error (L, "invalid length");
}
Write
Preview
Loading…
Cancel
Save