Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Libpng
提交
d3feb529
T
Third Party Libpng
项目概览
OpenHarmony
/
Third Party Libpng
大约 1 年 前同步成功
通知
4
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Libpng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d3feb529
编写于
11月 11, 2011
作者:
G
Glenn Randers-Pehrson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[libpng15] Ignore unused chunks in the new simplified read API.
上级
65f3ac19
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
1 deletion
+40
-1
pngread.c
pngread.c
+40
-1
未找到文件。
pngread.c
浏览文件 @
d3feb529
...
...
@@ -1342,6 +1342,44 @@ png_image_read_init(png_imagep image)
image
->
opaque
=
control
;
return
1
;
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
/* Prepare the reader to ignore all recognized chunks whose
* data will not be used, i.e., all chunks recognized by libpng
* except for IHDR, PLTE, IDAT, IEND, tRNS, bKGD, gAMA, cHRM,
* and sRGB.
*
* This provides a small performance improvement and eliminates
* any potential vulnerability to security problems in the unused
* chunks)
*/
{
static
/* const */
png_byte
chunks_to_ignore
[]
=
{
104
,
73
,
83
,
84
,
'\0'
,
/* hIST */
105
,
67
,
67
,
80
,
'\0'
,
/* iCCP */
105
,
84
,
88
,
116
,
'\0'
,
/* iTXt */
111
,
70
,
70
,
115
,
'\0'
,
/* oFFs */
112
,
67
,
65
,
76
,
'\0'
,
/* pCAL */
112
,
72
,
89
,
115
,
'\0'
,
/* pHYs */
115
,
66
,
73
,
84
,
'\0'
,
/* sBIT */
115
,
67
,
65
,
76
,
'\0'
,
/* sCAL */
115
,
80
,
76
,
84
,
'\0'
,
/* sPLT */
116
,
69
,
88
,
116
,
'\0'
,
/* tEXt */
116
,
73
,
77
,
69
,
'\0'
,
/* tIME */
122
,
84
,
88
,
116
,
'\0'
/* zTXt */
};
/* Ignore unknown chunks */
png_set_keep_unknown_chunks
(
png_ptr
,
1
/* PNG_HANDLE_CHUNK_NEVER */
,
NULL
,
0
);
/* Ignore known but unused chunks */
png_set_keep_unknown_chunks
(
png_ptr
,
1
/* PNG_HANDLE_CHUNK_NEVER */
,
chunks_to_ignore
,
sizeof
(
chunks_to_ignore
)
/
5
);
}
#endif
/* PNG_HANDLE_AS_UNKNOWN_SUPPORTED */
}
/* Error clean up */
...
...
@@ -1425,7 +1463,8 @@ png_image_read_header(png_voidp argument)
else
if
(
info_ptr
->
valid
&
PNG_INFO_iCCP
)
{
# if 0
/* TODO: IMPLEMENT THIS! */
# if 0
/* TODO: IMPLEMENT THIS! Remember to remove iCCP from
the list of unused chunks */
/* Here if we just have an iCCP chunk. */
if
(
!
png_iCCP_is_sRGB
(
png_ptr
,
info_ptr
))
# endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录