[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: image size limit?
From: |
Richard M. Stallman |
Subject: |
Re: image size limit? |
Date: |
Sun, 16 Oct 2005 13:36:41 -0400 |
As for libpng, the png_set_user_limits() function was only added in
version 1.0.16rc1, from 2004, so if we use that we'll lose
compatibility with older versions.
I think it is ok for the new Emacs to use a feature of libpng that
is one year old. Would you like to write the code?
Perhaps configure should verify that that entry point exists, and
call it only if it is available.
> 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.
>
> Will that succeed in handling the problem case we got?
It will avoid allocating too much memory in Emacs. Whether libungif
tries to allocate too much memory prior to this, depends on the
internal implementation of libungif. Worst that could happen is that
libungif believes the invalid width and height data, tries to malloc a
big chunk of memory, malloc fails, and DGifSlurp() frees the memory
and returns with an error, which we catch.
I am not sure that is the worst that can happen, but if it does happen,
I agree it is better than what happens now. So would you like to implement
that?
- image size limit?, Chong Yidong, 2005/10/11
- Re: image size limit?, Chong Yidong, 2005/10/16
- Re: image size limit?, Richard M. Stallman, 2005/10/17
- Re: image size limit?, Chong Yidong, 2005/10/17
- Re: image size limit?, Richard M. Stallman, 2005/10/17
- Re: image size limit?, Stefan Monnier, 2005/10/18
- Re: image size limit?, Kim F. Storm, 2005/10/19
- Re: image size limit?, David Kastrup, 2005/10/19
- Re: image size limit?, Chong Yidong, 2005/10/19
- Re: image size limit?, Richard M. Stallman, 2005/10/19
- Re: image size limit?, Kim F. Storm, 2005/10/19