Commit 32f0051a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Lua: sanitize events passed to poll()

parent f06dd9a2
...@@ -345,6 +345,7 @@ static int vlclua_net_poll( lua_State *L ) ...@@ -345,6 +345,7 @@ static int vlclua_net_poll( lua_State *L )
luafds[i] = luaL_checkinteger( L, -2 ); luafds[i] = luaL_checkinteger( L, -2 );
p_fds[i].fd = vlclua_fd_get( L, luafds[i] ); p_fds[i].fd = vlclua_fd_get( L, luafds[i] );
p_fds[i].events = luaL_checkinteger( L, -1 ); p_fds[i].events = luaL_checkinteger( L, -1 );
p_fds[i].events &= POLLIN | POLLOUT | POLLPRI;
lua_pop( L, 1 ); lua_pop( L, 1 );
i++; i++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment