Lua: sanitize events passed to poll()
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 30 Sep 2013 16:20:18 +0000 (19:20 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 30 Sep 2013 16:20:18 +0000 (19:20 +0300)
modules/lua/libs/net.c

index d1c5b5f..257f5af 100644 (file)
@@ -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++;
     }