Xv overlay: fix planar YUV copy for right rotated crtcs

While copying and rotating the buffer, array access was out of bounds when
rotated to the right (RR_Rotate_270).  My buffer handling changes probably
made this bug much more likely to actually result in a SIGSEGV.

I've checked the logs and the bug exists since rotation has been supported,
i.e.  this looks like a candidate for cherry-picking for all supported
releases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Daniel Vetter 2009-10-14 18:09:08 +02:00 committed by Eric Anholt
parent 703e3326bb
commit aaedeffe00
1 changed files with 2 additions and 2 deletions

View File

@ -887,13 +887,13 @@ I830CopyPackedData(intel_adaptor_private *adaptor_priv,
dst[(((h - i) * 2) - 3) + (j * dstPitch)] =
src[(j * 2) + 1 + (i * srcPitch)];
dst[(((h - i) * 2) - 3) +
((j - 1) * dstPitch)] =
((j + 1) * dstPitch)] =
src[(j * 2) + 1 + ((i + 1) * srcPitch)];
/* Copy V */
dst[(((h - i) * 2) - 1) + (j * dstPitch)] =
src[(j * 2) + 3 + (i * srcPitch)];
dst[(((h - i) * 2) - 1) +
((j - 1) * dstPitch)] =
((j + 1) * dstPitch)] =
src[(j * 2) + 3 + ((i + 1) * srcPitch)];
}
}