all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Romain Francoise <romain@orebokech.com>
Cc: "Göran Uddeborg" <goeran@uddeborg.se>, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [goeran@uddeborg.se: Crash when loading a particular gif image]
Date: Wed, 28 Sep 2005 09:30:26 +0200	[thread overview]
Message-ID: <87achxy7hp.fsf@pacem.orebokech.com> (raw)
In-Reply-To: <m3d5muuqzy.fsf@kfs-l.imdomain.dk> (Kim F. Storm's message of "Tue, 27 Sep 2005 23:42:41 +0200")

storm@cua.dk (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 <romain@orebokech.com> | I've become someone else's
it's a miracle -- http://orebokech.com/ | nightmare...

  parent reply	other threads:[~2005-09-28  7:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-14 14:07 [goeran@uddeborg.se: Crash when loading a particular gif image] Richard M. Stallman
2005-09-17 10:01 ` Romain Francoise
2005-09-18 12:14   ` Richard M. Stallman
2005-09-18 12:28     ` Göran Uddeborg
2005-09-18 12:55       ` Romain Francoise
2005-09-18 21:13         ` Göran Uddeborg
2005-09-24 14:01           ` Romain Francoise
2005-09-24 16:46             ` Göran Uddeborg
2005-09-27 20:10         ` Göran Uddeborg
2005-09-27 21:42           ` Kim F. Storm
2005-09-27 23:09             ` Johan Bockgård
2005-09-28  7:30             ` Romain Francoise [this message]
2005-09-28 13:35               ` Stefan Monnier
2005-09-29  2:43               ` Richard M. Stallman
2005-09-29 23:30                 ` Richard M. Stallman
2005-09-28 20:57             ` Göran Uddeborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87achxy7hp.fsf@pacem.orebokech.com \
    --to=romain@orebokech.com \
    --cc=emacs-devel@gnu.org \
    --cc=goeran@uddeborg.se \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.