提交 afa999d4 编写于 作者: G Glenn Randers-Pehrson

[devel] Revise the "#ifdef" blocks in png_inflate()

so it will compile when neither PNG_USER_CHUNK_MALLOC_MAX nor
PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED is defined.
上级 3919f23a
......@@ -86,6 +86,9 @@ version 1.5.0beta12 [March 9, 2010]
version 1.5.0beta13 [March 9, 2010]
Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice.
Revise the "#ifdef" blocks in png_inflate() so it will compile when neither
PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
is defined.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -2563,6 +2563,9 @@ version 1.5.0beta12 [March 9, 2010]
version 1.5.0beta13 [March 9, 2010]
Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice.
Revise the "#ifdef" blocks in png_inflate() so it will compile when neither
PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
is defined.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
......
......@@ -325,8 +325,10 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
if (png_ptr->user_chunk_malloc_max &&
(prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
#else
# ifdef PNG_USER_CHUNK_MALLOC_MAX
if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
# endif
#endif
png_warning(png_ptr, "Exceeded size limit while expanding chunk");
......@@ -335,7 +337,12 @@ png_decompress_chunk(png_structp png_ptr, int comp_type,
* and we have nothing to do - the code will exit through the
* error case below.
*/
#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
defined(PNG_USER_CHUNK_MALLOC_MAX)
else if (expanded_size > 0)
#else
if (expanded_size > 0)
#endif
{
/* Success (maybe) - really uncompress the chunk. */
png_size_t new_size = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册