~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to debian/patches/235-composite-tracking.diff

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-04-11 08:18:09 UTC
  • mfrom: (241.1.9 precise-proposed)
  • Revision ID: package-import@ubuntu.com-20130411081809-du9df8dyx635lujj
Tags: 2:1.11.4-0ubuntu10.13
* SECURITY UPDATE: input event leak via inactive VT
  - debian/patches/CVE-2013-1940.patch: fix flush input to work with
    Linux evdev devices in hw/xfree86/os-support/shared/posix_tty.c.
  - CVE-2013-1940

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff --git a/exa/exa_priv.h b/exa/exa_priv.h
 
2
index 70de4bd..60aa328 100644
 
3
--- a/exa/exa_priv.h
 
4
+++ b/exa/exa_priv.h
 
5
@@ -206,6 +206,7 @@ typedef struct {
 
6
     RegionRec srcReg;
 
7
     RegionRec maskReg;
 
8
     PixmapPtr srcPix;
 
9
+    PixmapPtr maskPix;
 
10
 
 
11
 } ExaScreenPrivRec, *ExaScreenPrivPtr;
 
12
 
 
13
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
 
14
index 219f903..7d83d15 100644
 
15
--- a/exa/exa_unaccel.c
 
16
+++ b/exa/exa_unaccel.c
 
17
@@ -448,6 +448,13 @@ ExaSrcValidate(DrawablePtr pDrawable,
 
18
     RegionPtr dst;
 
19
     int xoff, yoff;
 
20
 
 
21
+    if (pExaScr->srcPix == pPix)
 
22
+        dst = &pExaScr->srcReg;
 
23
+    else if (pExaScr->maskPix == pPix)
 
24
+        dst = &pExaScr->maskReg;
 
25
+    else
 
26
+        return;
 
27
+
 
28
     exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
 
29
 
 
30
     box.x1 = x + xoff;
 
31
@@ -455,9 +462,6 @@ ExaSrcValidate(DrawablePtr pDrawable,
 
32
     box.x2 = box.x1 + width;
 
33
     box.y2 = box.y1 + height;
 
34
 
 
35
-    dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg :
 
36
-       &pExaScr->maskReg;
 
37
-
 
38
     RegionInit(&reg, &box, 1);
 
39
     RegionUnion(dst, dst, &reg);
 
40
     RegionUninit(&reg);
 
41
@@ -506,17 +510,20 @@ ExaPrepareCompositeReg(ScreenPtr  pScreen,
 
42
            RegionTranslate(pSrc->pCompositeClip,
 
43
                             -pSrc->pDrawable->x,
 
44
                             -pSrc->pDrawable->y);
 
45
-    }
 
46
+    } else
 
47
+        pExaScr->srcPix = NULL;
 
48
 
 
49
     if (pMask && pMask->pDrawable) {
 
50
        pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
 
51
        RegionNull(&pExaScr->maskReg);
 
52
        maskReg = &pExaScr->maskReg;
 
53
+       pExaScr->maskPix = pMaskPix;
 
54
        if (pMask != pDst && pMask != pSrc)
 
55
            RegionTranslate(pMask->pCompositeClip,
 
56
                             -pMask->pDrawable->x,
 
57
                             -pMask->pDrawable->y);
 
58
-    }
 
59
+    } else
 
60
+        pExaScr->maskPix = NULL;
 
61
 
 
62
     RegionTranslate(pDst->pCompositeClip,
 
63
                     -pDst->pDrawable->x,