Avoid global access in nmap.receive_buf

This commit is contained in:
dmiller
2026-10-19 19:49:47 +00:00
parent 29cb897062
commit 13d8e22c07
+1 -3
View File
@@ -778,9 +778,7 @@ static int receive_buf (lua_State *L, int status, lua_KContext ctx)
}
else /* string */
{
lua_getglobal(L, "string");
lua_getfield(L, -1, "find");
lua_replace(L, -2);
lua_getfield(L, 2, "find");
lua_pushvalue(L, 5);
lua_pushvalue(L, 2);
lua_call(L, 2, 2); /* we do not allow yields */