security check

This commit is contained in:
Axel Kittenberger 2010-12-07 12:50:31 +00:00
parent 8b2e05a681
commit 2f21d0f0b8

View File

@ -1555,12 +1555,16 @@ masterloop(lua_State *L)
} }
} }
if (!observances_len) {
logstring("Error",
"Internal fail, no observances, no monitor!");
exit(-1);
}
/* the great select */ /* the great select */
pr = pselect( pr = pselect(
observances[observances_len - 1].fd + 1, observances[observances_len - 1].fd + 1,
&rfds, &wfds, NULL, &rfds, &wfds, NULL,
have_alarm ? &tv : NULL, &sigset); have_alarm ? &tv : NULL, &sigset);
if (pr >= 0) { if (pr >= 0) {
/* walks through the observances calling ready/writey */ /* walks through the observances calling ready/writey */
observance_action = true; observance_action = true;