> If we handle them one by one, it won't be terribly tricky. > We could have one limit for memory size of an image, and another limit > for the width and height as a ratio to those of the window. > Then for each image type it would use whichever of those can be used.
Here's another idea. We impose a limit on the size of the image file that Emacs is willing to read, say 50 megabytes. This should be easy to implement and independent of image type. At the same time, we implement image width and height limits in x_create_x_image_and_pixmap, to deal with malicious images that specify gigantic width and height sizes, even though the file size isn't that big. That should catch most of the problematic images, and we don't have to fiddle with the individual image libraries. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel