代码拉取完成,页面将自动刷新
From 77a817bfc298a221e3e623acf73c2a1e726c4ec6 Mon Sep 17 00:00:00 2001
From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
Date: Thu, 17 Jan 2013 10:52:48 -0600
Subject: [PATCH] [libpng15] Change info_ptr->unknown_chunks_num to type
png_uint_32
and test against INT_MAX instead of UINT_MAX in pngset.c
---
png.h | 2 +-
pngset.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/png.h b/png.h
index db5ca8f..19768ee 100644
--- a/png.h
+++ b/png.h
@@ -786,7 +786,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
/* Storage for unknown chunks that the library doesn't recognize. */
png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT;
- png_size_t unknown_chunks_num PNG_DEPSTRUCT;
+ png_uint_32 unknown_chunks_num PNG_DEPSTRUCT;
#endif
#ifdef PNG_iCCP_SUPPORTED
diff --git a/pngset.c b/pngset.c
index 94e5c92..b8890ec 100644
--- a/pngset.c
+++ b/pngset.c
@@ -1025,7 +1025,7 @@ png_set_unknown_chunks(png_structp png_ptr,
return;
if (num_unknowns < 0 ||
- num_unknowns >= UINT_MAX-info_ptr->unknown_chunks_num ||
+ num_unknowns >= INT_MAX-info_ptr->unknown_chunks_num ||
num_unknowns >= PNG_SIZE_MAX/png_sizeof(png_unknown_chunk)
- info_ptr->unknown_chunks_num)
np=NULL;
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。