mirror of
https://github.com/mpv-player/mpv
synced 2025-01-26 01:23:17 +00:00
audio/out/push: fix off-by-one error
Needs 1 additional free entry. Found by Coverity.
This commit is contained in:
parent
459f3aa4f9
commit
524aa99401
@ -464,7 +464,7 @@ int ao_wait_poll(struct ao *ao, struct pollfd *fds, int num_fds,
|
|||||||
assert(ao->api == &ao_api_push);
|
assert(ao->api == &ao_api_push);
|
||||||
assert(&p->lock == lock);
|
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;
|
return -1;
|
||||||
|
|
||||||
struct pollfd p_fds[MAX_POLL_FDS];
|
struct pollfd p_fds[MAX_POLL_FDS];
|
||||||
|
Loading…
Reference in New Issue
Block a user