Chong Yidong wrote:
> One place where we can set a limit is in x_create_x_image_and_pixmap,
> where we malloc a pixmap to store the image contents.  The data
> supplied to us by the external library is copied into this pixmap.  We
> could signal an error if width and height are too large.  However,
> this seems like closing the barn door after the horses have left --
> the external library will already have allocated a big chunk of
> memory.

But freeing that memory immediately (if the library provides such a
function) and signalling the error would certainly be better than
allocating the memory for the pixmap and proceeding to display the
image.  It's more like closing the barn door after half of the horses
have left.

--
Kevin Rodgers



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to