emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Crash when loading a particular gif image]


From: Romain Francoise
Subject: Re: address@hidden: Crash when loading a particular gif image]
Date: Wed, 28 Sep 2005 09:30:26 +0200

address@hidden (Kim F. Storm) writes:

> !   image_top = gif->SavedImages[ino].ImageDesc.Top;
> !   image_left = gif->SavedImages[ino].ImageDesc.Left;
> !   image_width = gif->SavedImages[ino].ImageDesc.Width;
> !   image_height = gif->SavedImages[ino].ImageDesc.Height;
> ! 
> !   width = img->width = max (gif->SWidth,
> !                         max (gif->Image.Left + gif->Image.Width,
> !                              image_left + image_width));
> !   height = img->height = max (gif->SHeight,
> !                           max (gif->Image.Top + gif->Image.Height,
> !                                image_top + image_height));

This patch probably fixes the bug, but Emacs should really enforce
limits on the dimensions given by the GIF library.  What if it reports
an image width of two million pixels?  Do we really want to allocate
such large images and pixmaps?

Bounding the image to, say, 2048 pixels in both dimensions sounds
reasonable.

(Yes, I know about the GNU convention of not having arbitrary limits.)

-- 
Romain Francoise <address@hidden> | I've become someone else's
it's a miracle -- http://orebokech.com/ | nightmare...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]