[AD] Re: [AL] draw_sprite reading non-allocated memory?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2006-04-03, christer.sandberg@xxxxxxxxxx <christer.sandberg@xxxxxxxxxx> wrote:
> Quoting Peter Wang <tjaden@xxxxxxxxxx>:
> > I'm not familiar with assembler either, but we already have a
> > workaround
> > in create_bitmap_ex() to allocate a little extra memory than is
> > strictly
> > required to avoid reading out of bounds (in 24bpp mode).  Maybe you
> > could try a similar thing to check if that really is the problem?
> I'm now quite sure that the asm code uses the second pointer to pre calcualte
> the width of the sprite. This value will be random in case of one pixel height,
> but it will never get used since the loop terminates before the first use. Thus
> allocating space for an extra pointer will not hide any problem.
> The attached patch against svn 4.3 works around the problem.

Thanks, I have committed a slightly modified version.

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/