Re: libnsgif and memory bombs

2021-04-06 Thread jcupitt
That's great, thanks Michael. I'll remove my patch and update from your repo. On Mon, 5 Apr 2021 at 14:51, Michael Drake wrote: > > Hi John, > > Thanks for the patch. It is an improvement and I've applied it. > I'm currently considering moving the call to gif_initialise_sprite > into gif_decode_

Re: libnsgif and memory bombs

2021-04-05 Thread Michael Drake
Hi John, Thanks for the patch. It is an improvement and I've applied it. I'm currently considering moving the call to gif_initialise_sprite into gif_decode_frame so that the bitmap area is always created when a client calls gif_decode_frame. At the moment it will only happen for the first frame

Re: libnsgif and memory bombs

2021-04-05 Thread Michael Drake
Thanks John, I'll have a look at it soon. Best regards, Michael On 03/04/2021 12:33, jcup...@gmail.com wrote: > Here's a better version of the patch: > > https://github.com/libvips/libvips/blob/master/libvips/foreign/libnsgif/patches/delay-alloc.patch > > (removes a stray create_bitmap call) >

Re: libnsgif and memory bombs

2021-04-03 Thread jcupitt
Here's a better version of the patch: https://github.com/libvips/libvips/blob/master/libvips/foreign/libnsgif/patches/delay-alloc.patch (removes a stray create_bitmap call) On Fri, 2 Apr 2021 at 11:58, wrote: > > Hi all, > > I had a thought regarding memory allocation in libnsgif. > > At the m

libnsgif and memory bombs

2021-04-03 Thread jcupitt
Hi all, I had a thought regarding memory allocation in libnsgif. At the moment, calling `gif_initialise()` will parse the GIF file and allocate memory for rendering. You then call gif_decode_frame() to decompress and render each frame of the animation. However, this means just opening the GIF ca