From 99c22b3a1824cee80685040372bfcca6c821f2eb Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 31 Oct 2012 01:27:52 +0200 Subject: [PATCH] vo_vdpau: fix off-by-one in rare error check Probably doesn't matter much in practice. --- libvo/vo_vdpau.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvo/vo_vdpau.c b/libvo/vo_vdpau.c index f2f57dddc5..0c99f5dfb2 100644 --- a/libvo/vo_vdpau.c +++ b/libvo/vo_vdpau.c @@ -1447,7 +1447,7 @@ static struct vdpau_render_state *get_surface(struct vo *vo, int number) struct vdpctx *vc = vo->priv; struct vdp_functions *vdp = vc->vdp; - if (number > MAX_VIDEO_SURFACES) + if (number >= MAX_VIDEO_SURFACES) return NULL; if (vc->surface_render[number].surface == VDP_INVALID_HANDLE && !vc->is_preempted) { -- 2.11.4.GIT