-
Notifications
You must be signed in to change notification settings - Fork 274
Closed
Milestone
Description
libgd 2.2.5
In gd_gif_out::gdImageGifAnimAddCtx we find this comment:
/* create optimized animation. Compare this image to
the previous image and crop the temporary copy of
current image to include only changed rectangular
[snip]
Images should be of same size. If not, a temporary
copy is made with the same size as previous image.
*/
The "should be" remark is true, but in fact no such copy is made.
As a result, whenever (tim->sy > prev_tim->sy) the code segfaults while trying to compare pixels.
De-selecting optimization avoids the bad code and image generation proceeds normally.
The problem was found while tracing a segfault generated by calls into libgd from gnuplot.
https://sourceforge.net/p/gnuplot/bugs/1992/
It is 100% reproducible on multiple platforms, but I have not tried to construct a small artificial demonstration code not involving gnuplot.
Metadata
Metadata
Assignees
Labels
No labels