]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/lua: Fix max value displayed in error msg
authorJeff Lucovsky <jlucovsky@oisf.net>
Wed, 8 Jan 2025 14:27:10 +0000 (09:27 -0500)
committerVictor Julien <victor@inliniac.net>
Sun, 9 Mar 2025 06:29:31 +0000 (07:29 +0100)
This commit corrects an error message displayed when the key length is
out of range.

src/detect-lua-extensions.c

index 615653ddc739ea76f2ffac89af64d206327baa03..d950f61bd9791647216c15cc587eb3acd72b2756 100644 (file)
@@ -269,7 +269,7 @@ static int LuaSetFlowvarByKey(lua_State *luastate)
     }
     keylen = lua_tonumber(luastate, 2);
     if (keylen < 0 || keylen > 0xff) {
-        LUA_ERROR("key len out of range: max 256");
+        LUA_ERROR("key len out of range: max 255");
     }
 
     if (!lua_isstring(luastate, 3)) {