Changeset

10096:46a7792fdac5

util.poll: Add missing return statements in fallback mode These allowed modifying or deleting select() state for unregistered FDs. During normal usage this should never happen. Modifying one that isn't set might cause weirdness but deleting an already deleted FD isn't a problem.
author Kim Alvefur <zash@zash.se>
date Sun, 28 Jul 2019 16:17:23 +0200
parents 10095:a3c66d0294e1
children 10097:1f45d316b222
files util-src/poll.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/poll.c	Sun Jul 28 01:43:10 2019 +0200
+++ b/util-src/poll.c	Sun Jul 28 16:17:23 2019 +0200
@@ -172,6 +172,7 @@
 		lua_pushnil(L);
 		lua_pushstring(L, strerror(ENOENT));
 		lua_pushinteger(L, ENOENT);
+		return 3;
 	}
 
 	if(!lua_isnoneornil(L, 3)) {
@@ -229,6 +230,7 @@
 		lua_pushnil(L);
 		lua_pushstring(L, strerror(ENOENT));
 		lua_pushinteger(L, ENOENT);
+		return 3;
 	}
 
 	FD_CLR(fd, &state->wantread);