[Top][All Lists]

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

Re: image size limit?

From: Kevin Rodgers
Subject: Re: image size limit?
Date: Tue, 11 Oct 2005 15:19:50 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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

reply via email to

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