[vlc-commits] Lua: sanitize events passed to poll()
Rémi Denis-Courmont
git at videolan.org
Mon Sep 30 18:20:54 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Sep 30 19:20:18 2013 +0300| [32f0051a02a644156bcd36b859ae71748cc29310] | committer: Rémi Denis-Courmont
Lua: sanitize events passed to poll()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32f0051a02a644156bcd36b859ae71748cc29310
---
modules/lua/libs/net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/modules/lua/libs/net.c b/modules/lua/libs/net.c
index d1c5b5f..257f5af 100644
--- a/modules/lua/libs/net.c
+++ b/modules/lua/libs/net.c
@@ -345,6 +345,7 @@ static int vlclua_net_poll( lua_State *L )
luafds[i] = luaL_checkinteger( L, -2 );
p_fds[i].fd = vlclua_fd_get( L, luafds[i] );
p_fds[i].events = luaL_checkinteger( L, -1 );
+ p_fds[i].events &= POLLIN | POLLOUT | POLLPRI;
lua_pop( L, 1 );
i++;
}
More information about the vlc-commits
mailing list