mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
audio/out/push: fix off-by-one error
Needs 1 additional free entry. Found by Coverity.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user