diff options
author | wm4 <wm4@nowhere> | 2014-11-21 03:50:15 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-21 03:50:57 +0100 |
commit | 524aa99401d0dc35ff78ca0dcf381ad947efd9e9 (patch) | |
tree | a5e0180ac66b89df182f67271afad3538d8ae068 | |
parent | 459f3aa4f97646a71f4a440c347dca124c0f71ce (diff) | |
download | mpv-524aa99401d0dc35ff78ca0dcf381ad947efd9e9.tar.bz2 mpv-524aa99401d0dc35ff78ca0dcf381ad947efd9e9.tar.xz |
audio/out/push: fix off-by-one error
Needs 1 additional free entry.
Found by Coverity.
-rw-r--r-- | audio/out/push.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/push.c b/audio/out/push.c index 5bbc7d808f..8e3d2f87b0 100644 --- a/audio/out/push.c +++ b/audio/out/push.c @@ -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]; |