xf86-video-intel: src/intel_video.c src/sna/sna_video_overlay.c

Dave Airlie airlied at kemper.freedesktop.org
Sun Aug 12 03:53:15 PDT 2012


 src/intel_video.c           |    2 +-
 src/sna/sna_video_overlay.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b580abdfa68108f3e63ee1f897b6ea83b9c47935
Author: Dave Airlie <airlied at gmail.com>
Date:   Sun Aug 12 20:52:12 2012 +1000

    intel: fix video xvPipe range check
    
    Pointed out by Russell King on irc.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

diff --git a/src/intel_video.c b/src/intel_video.c
index c8a9a92..0be72e2 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -675,7 +675,7 @@ I830SetPortAttributeOverlay(ScrnInfoPtr scrn,
 		adaptor_priv->saturation = value;
 	} else if (attribute == xvPipe) {
 		xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-		if ((value < -1) || (value > xf86_config->num_crtc))
+		if ((value < -1) || (value >= xf86_config->num_crtc))
 			return BadValue;
 		if (value < 0)
 			adaptor_priv->desired_crtc = NULL;
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c
index 068f234..babdfc6 100644
--- a/src/sna/sna_video_overlay.c
+++ b/src/sna/sna_video_overlay.c
@@ -194,7 +194,7 @@ sna_video_overlay_set_port_attribute(ScrnInfoPtr scrn,
 		video->saturation = value;
 	} else if (attribute == xvPipe) {
 		xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
-		if ((value < -1) || (value > xf86_config->num_crtc))
+		if ((value < -1) || (value >= xf86_config->num_crtc))
 			return BadValue;
 		if (value < 0)
 			video->desired_crtc = NULL;


More information about the xorg-commit mailing list