From 32f0051a02a644156bcd36b859ae71748cc29310 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Mon, 30 Sep 2013 19:20:18 +0300
Subject: [PATCH] Lua: sanitize events passed to poll()

---
 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 d1c5b5f49893..257f5af918c5 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++;
     }
-- 
GitLab