XEmacs and 1x1 gif images
Robert Pluim
rpluim at gmail.com
Sat Dec 31 10:52:48 EST 2011
On Sat, Dec 31, 2011 at 2:58 PM, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> Robert Pluim writes:
>
> > Should we not bail out much earlier when we actually read in the gif
> > (and silently)?
>
> For now, issue822.
>
> XEmacs knows nothing about GIF (any more; 21.4 does use an ancient
> giflib which is included as source in our distribution, but I am
> certainly not willing to learn enough about GIF and that code to fix
> it -- patches welcome, of course). I have read the emacs-devel
> thread, and will take a look at better handling of errors from
> DGifSlurp as cyd mentions, but I don't know yet if we use that or a
> higher-level function.
>
We do use DGifSlurp, and that's what's telling us that the GIF file is
invalid, causing us to signal an error. I'd expect us to then return
'nil', but it appears that somehow a literal '0' is escaping to lisp.
I'm currently lost in a maze of unwind-protect and
call_with_suspended_errors to see how this could be fixed.
> If you have an alternative suggestion for how to recognize broken GIF
> files without reimplementing the GIF decoding process, I'd be willing
> to investigate that.
>
> One possibility would be to revive the ImageMagick/GraphicsMagick
> strategy of linking to one of the omnibus image-handling packages, but
> that's pretty expensive compared to waiting for a fix from libgif.
>
I don't think we need look into that just yet.
> BTW, this looks similar to
>
> http://list-archive.xemacs.org/pipermail/xemacs-beta/2010-August/019895.html
>
> at least as far as having a very small GIF file involved.
Yes, it's similar, except that now we don't crash.
Robert
More information about the XEmacs-Beta
mailing list