via: off by one issue
Subsystems (3)
PATCH 1/1 via: off by one issue
"fx->lock" is used as the index in "dev_priv->decoder_queue[fx->lock]" which is an array of "VIA_NR_XVMC_LOCKS" elements.
Signed-off-by Dan Carpenter <[email protected]>
drivers/gpu/drm/via/via_video.c +1 -1
@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_DRM_DEBUG ("\n" ); -if (fx->lock >VIA_NR_XVMC_LOCKS ) +if (fx->lock >=VIA_NR_XVMC_LOCKS )return -EFAULT ; lock = (volatile int *)XVMCLOCKPTR (sAPriv, fx->lock);