audio/out/push: fix off-by-one error

Needs 1 additional free entry.

Found by Coverity.
This commit is contained in:
wm4 2014-11-21 03:50:15 +01:00
parent 459f3aa4f9
commit 524aa99401
1 changed files with 1 additions and 1 deletions

View File

@ -464,7 +464,7 @@ int ao_wait_poll(struct ao *ao, struct pollfd *fds, int num_fds,
assert(ao->api == &ao_api_push);
assert(&p->lock == lock);
if (num_fds > MAX_POLL_FDS || p->wakeup_pipe[0] < 0)
if (num_fds >= MAX_POLL_FDS || p->wakeup_pipe[0] < 0)
return -1;
struct pollfd p_fds[MAX_POLL_FDS];