Regression: Winrar fails to start

Dmitry Timoshkov dmitry at baikal.ru
Fri Nov 11 01:21:27 CST 2005


<wino at piments.com> wrote:

> http://www.x.org/pub/X11R6.8.2/patches/xorg-CAN-2005-2495.patch -
> 
> +    if (stuff->width > 32767 || stuff->height > 32767)
> +    {
> +/* It is allowed to try and allocate a pixmap which is larger than
> + * 32767 in either dimension. However, all of the framebuffer code
> + * is buggy and does not reliably draw to such big pixmaps, basically
> + * because the Region data structure operates with signed shorts
> + * for the rectangles in it.
> + *
> + * Furthermore, several places in the X server computes the
> + * size in bytes of the pixmap and tries to store it in an
> + * integer. This integer can overflow and cause the allocated size
> + * to be much smaller.
> + *
> + * So, such big pixmaps are rejected here with a BadAlloc
> + */
> +return BadAlloc;

This clearly indicates the places X server sources which need to be fixed.
Carefully reread very first sentence if still in doubt.

> Frankly I'm shocked.
> And appologies to the creator of that patch for my having made comment on  
> the basis of what was posted here.
> 
> 
> from
> http://bugs.winehq.org/show_bug.cgi?id=3573
> 
> It seems to be that WinRAR crashes after calling:
> ImageList_Create(16,16,ILC_COLOR32|ILC_MASK,256,2048)
> to create the list of icons for ListView control. Wine translates
> this ImageList_Create to CreateBitmapIndirect 36864x16 and then
> cannot handle 36864 parameter. If it is true, I think, it should be
> fixed in Wine. I cannot find any errors in WinRAR ImageList_Create call.

Wine ought to be able to handle images larger than 32767x32767, that's not
a Wine requirement, that's what applications written for win32 API expect
to see working. There is no way to make it work without DIB engine if X11
doesn't support it due to ineternal bugs.

-- 
Dmitry.




More information about the wine-devel mailing list