~ubuntu-branches/ubuntu/maverick/xorg-server/maverick-security

« back to all changes in this revision

Viewing changes to hw/xfree86/xaa/xaaCpyArea.c

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2010-08-05 11:25:14 UTC
  • mfrom: (1.1.35 upstream) (0.1.14 experimental)
  • Revision ID: james.westby@ubuntu.com-20100805112514-q4efdgj3nblevos2
Tags: 2:1.8.99.905-1ubuntu1
* Merge from (unreleased) Debian experimental.  Remaining Ubuntu changes:
  - rules, control:
    + Disable SELinux, libaudit-dev is not in main yet (LP 406226).
      Drop libaudit-dev from build-deps.
  - rules: Enable xcsecurity (LP 247537).
  - local/xvfb-run*: Add correct docs about error codes (LP 328205)
  - rules: Add --with-extra-module-dir to support GL alternatives.
  - control: Xvfb depends on xauth, x11-xkb-utils. (LP 500102)
  - rules, local/64-xorg-xkb.rules: Don't use keyboard-configuration
    until it's available.
  - control: Update some versioned Breaks for Ubuntu versions.
  - debian/patches:
    + 100_rethrow_signals.patch:
      When aborting, re-raise signals for apport
    + 109_fix-swcursor-crash.patch:
      Avoid dereferencing null pointer while reloading cursors during
      resume. (LP 371405)
    + 111_armel-drv-fallbacks.patch:
      Add support for armel driver fallbacks.
    + 121_only_switch_vt_when_active.diff:
      Add a check to prevent the X server from changing the VT when killing
      GDM from the console.
    + 122_xext_fix_card32_overflow_in_xauth.patch:
      Fix server crash when “xauth generate” is called with large timeout.
    + 157_check_null_modes.patch, 162_null_crtc_in_rotation.patch,
      166_nullptr_xinerama_keyrepeat.patch, 167_nullptr_xisbread.patch
      169_mipointer_nullptr_checks.patch,
      172_cwgetbackingpicture_nullptr_check.patch:
      Fix various segfaults in xserver by checking pointers for NULL
      values before dereferencing them.
    + 165_man_xorg_conf_no_device_ident.patch
      Correct man page
    + 168_glibc_trace_to_stderr.patch:
      Report abort traces to stderr instead of terminal
    + 184_virtual_devices_autodetect.patch:
      Use vesa for qemu device, which is not supported by cirrus
    + 187_edid_quirk_hp_nc8430.patch:
      Quirk for another LPL monitor (LP 380009)
    + 188_default_primary_to_first_busid.patch:
      Pick the first device and carry on (LP 459512)
    + 189_xserver_1.5.0_bg_none_root.patch:
      Create a root window with no background.
    + 190_cache-xkbcomp_output_for_fast_start_up.patch:
      Cache keyboard settings.
    + 191-Xorg-add-an-extra-module-path.patch:
      Add support for the alternatives module path.
    + 197_xvfb-randr.patch:
      Adds xrandr support to xvfb. (LP 516123)
    + 198_nohwaccess.patch:
      Adds a -nohwaccess argument to make X not access the hardware
      ports directly.
    + 200_randr-null.patch:
      Clarify a pointer initialization.
* Update changelog entries for 1.8.1.902-1 which became 1.8.99.904-1
* Drop 196_xvfbscreeninit-handling.patch: it's semantically empty, and now 
  doesn't apply.  Merge remaining #include change into 197_xvfb-randr.patch
* New upstream version will start correctly when no outputs are connected,
  as long as the video driver can dynamically resize the framebuffer
  (true for all KMS drivers) (LP: #337889)
* New upstream version fixes crash on non-admin logout with KDE (LP: #569879)
* Refresh 111_armel-drv-fallbacks.patch to fix the build on armel

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
               ((pSrc->type == DRAWABLE_WINDOW) &&
96
96
                (pDst->type == DRAWABLE_WINDOW)));
97
97
 
98
 
    pbox = REGION_RECTS(prgnDst);
99
 
    nbox = REGION_NUM_RECTS(prgnDst);
 
98
    pbox = RegionRects(prgnDst);
 
99
    nbox = RegionNumRects(prgnDst);
100
100
 
101
101
    pboxNew1 = NULL;
102
102
    pptNew1 = NULL;
108
108
 
109
109
        if (nbox > 1) {
110
110
            /* keep ordering in each band, reverse order of bands */
111
 
            pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
 
111
            pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec) * nbox);
112
112
            if(!pboxNew1)
113
113
                return;
114
 
            pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
 
114
            pptNew1 = (DDXPointPtr)malloc(sizeof(DDXPointRec) * nbox);
115
115
            if(!pptNew1) {
116
 
                xfree(pboxNew1);
 
116
                free(pboxNew1);
117
117
                return;
118
118
            }
119
119
            pboxBase = pboxNext = pbox+nbox-1;
145
145
 
146
146
        if (nbox > 1) {
147
147
            /* reverse order of rects in each band */
148
 
            pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox);
149
 
            pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox);
 
148
            pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec) * nbox);
 
149
            pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec) * nbox);
150
150
            if(!pboxNew2 || !pptNew2) {
151
 
                if (pptNew2) xfree(pptNew2);
152
 
                if (pboxNew2) xfree(pboxNew2);
 
151
                free(pptNew2);
 
152
                free(pboxNew2);
153
153
                if (pboxNew1) {
154
 
                    xfree(pptNew1);
155
 
                    xfree(pboxNew1);
 
154
                    free(pptNew1);
 
155
                    free(pboxNew1);
156
156
                }
157
157
                return;
158
158
            }
183
183
        xdir, ydir, pGC->alu, pGC->planemask);
184
184
 
185
185
    if (pboxNew2) {
186
 
        xfree(pptNew2);
187
 
        xfree(pboxNew2);
 
186
        free(pptNew2);
 
187
        free(pboxNew2);
188
188
    }
189
189
    if (pboxNew1) {
190
 
        xfree(pptNew1);
191
 
        xfree(pboxNew1);
 
190
        free(pptNew1);
 
191
        free(pboxNew1);
192
192
    }
193
193
 
194
194
}
204
204
    int srcwidth;
205
205
    unsigned char* psrcBase;                    /* start of image */
206
206
    unsigned char* srcPntr;                     /* index into the image */
207
 
    BoxPtr pbox = REGION_RECTS(prgnDst);
208
 
    int nbox = REGION_NUM_RECTS(prgnDst);
 
207
    BoxPtr pbox = RegionRects(prgnDst);
 
208
    int nbox = RegionNumRects(prgnDst);
209
209
    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
210
210
    int Bpp = pSrc->bitsPerPixel >> 3; 
211
211
 
233
233
    int dstwidth;
234
234
    unsigned char* pdstBase;                    /* start of image */
235
235
    unsigned char* dstPntr;                     /* index into the image */
236
 
    BoxPtr pbox = REGION_RECTS(prgnDst);
237
 
    int nbox = REGION_NUM_RECTS(prgnDst);
 
236
    BoxPtr pbox = RegionRects(prgnDst);
 
237
    int nbox = RegionNumRects(prgnDst);
238
238
    XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC);
239
239
    int Bpp = pSrc->bitsPerPixel >> 3;  /* wouldn't get here unless both
240
240
                                           src and dst have same bpp */