XCreatePixmap returns BadAlloc for a 8300 wide image in latest git

Barry Scott barry.scott at onelan.co.uk
Wed Jun 20 04:58:34 PDT 2007

I have been running a test case and using gdb on Xorg to find out where 
the BadAlloc
comes from.

In exa.c line 226 the code imposes a width limit of 32767.

But on line 256 this code imposes a width limit of 8188.

    if (pExaPixmap->fb_pitch > 32767) {
    return NULL;

Why is the second check required at all?

If it is required then is the fix to change the code to this?

    if ((pExaPixmap->fb_pitch/4)-1 > 32767) {

(without the -1 the limit is 32764).


More information about the xorg mailing list