From: Roel Kluin <roel.kl...@gmail.com>

dev_priv->saveSWF1 is a 16 element array, but this reads up to index 22

Signed-off-by: Roel Kluin <roel.kl...@gmail.com>
Cc: Pavel Machek <pa...@ucw.cz>
Cc: Dave Airlie <airl...@linux.ie>
Acked-by: Jesse Barnes <jbar...@virtuousgeek.org>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
---

 drivers/gpu/drm/i915/i915_suspend.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN 
drivers/gpu/drm/i915/i915_suspend.c~i915-fix-read-outside-array-bounds 
drivers/gpu/drm/i915/i915_suspend.c
--- a/drivers/gpu/drm/i915/i915_suspend.c~i915-fix-read-outside-array-bounds
+++ a/drivers/gpu/drm/i915/i915_suspend.c
@@ -598,7 +598,7 @@ int i915_restore_state(struct drm_device
 
        for (i = 0; i < 16; i++) {
                I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]);
-               I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]);
+               I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i]);
        }
        for (i = 0; i < 3; i++)
                I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);
_

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to