mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-01 09:30:09 +01:00
Fix ShmPutImage for XYBitmap
We can't call CopyArea in that case because the image has depth 1, which might not match the target drawable, so we might overrun the shm segment. Commit11817a881capparently fixed a similar bug for XYPixmap, but missed the bitmap case. Fixes: http://bugs.debian.org/629611 Thanks to Alan Curry for diagnosing this and providing a test case. Reported-and-tested-by: Alan Curry <pacman@kosh.dhis.org> Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit08ec4da6a7)
This commit is contained in:
parent
b2a4c09507
commit
b736f8c92b
1 changed files with 1 additions and 1 deletions
|
|
@ -482,7 +482,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
|
|||
{
|
||||
PixmapPtr pPixmap;
|
||||
|
||||
if (format == ZPixmap || depth == 1) {
|
||||
if (format == ZPixmap || (format == XYPixmap && depth == 1)) {
|
||||
pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth,
|
||||
BitsPerPixel(depth),
|
||||
PixmapBytePad(w, depth),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue