[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: XPutImage() Seg Fault
From:       Glynn Clements <glynn () gclements ! plus ! com>
Date:       2015-01-27 15:38:34
Message-ID: 21703.45306.533649.664109 () cerise ! gclements ! plus ! com
[Download RAW message or body]


Richard Overstreet wrote:

>  displaydata = (unsigned char *)calloc(ROWS*COLS*2, sizeof(unsigned char));
> 
>  
>  
> Picture=XCreateImage(Monitor,DefaultVisual(Monitor,0),
>         DefaultDepth(Monitor,0),

Is the display depth actually 16 bpp? If it's 32 bpp, the XPutImage
call will try to copy twice as much data as you've allocated, which
may well result in a segfault.

-- 
Glynn Clements <glynn@gclements.plus.com>
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: http://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic