From 524aa99401d0dc35ff78ca0dcf381ad947efd9e9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 21 Nov 2014 03:50:15 +0100 Subject: audio/out/push: fix off-by-one error Needs 1 additional free entry. Found by Coverity. --- audio/out/push.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/out/push.c') 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]; -- cgit v1.2.3