Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3564ee52
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3564ee52
编写于
8月 14, 2009
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[HB] Correctly sanitize LigatureAttach
上级
cb71a2fb
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
9 deletion
+19
-9
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+10
-4
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+4
-0
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+2
-2
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+3
-3
未找到文件。
src/hb-open-type-private.hh
浏览文件 @
3564ee52
...
...
@@ -515,12 +515,15 @@ struct GenericArrayOf
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
SANITIZE_DEBUG
();
if
(
!
SANITIZE_GET_SIZE
())
return
false
;
/* Note; for non-recursive types, this is not much needed
/* Note:
* for non-recursive types, this is not much needed.
* But we keep the code to make sure the objects pointed to
* do have a simple sanitize(). */
return
true
;
unsigned
int
count
=
len
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
SANITIZE
(
array
[
i
]))
return
false
;
*/
return
true
;
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
,
const
void
*
base
)
{
...
...
@@ -591,12 +594,15 @@ struct HeadlessArrayOf
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
SANITIZE_DEBUG
();
if
(
!
SANITIZE_GET_SIZE
())
return
false
;
/* Note; for non-recursive types, this is not much needed
/* Note:
* for non-recursive types, this is not much needed.
* But we keep the code to make sure the objects pointed to
* do have a simple sanitize(). */
return
true
;
unsigned
int
count
=
len
?
len
-
1
:
0
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
if
(
!
SANITIZE
(
array
[
i
]))
return
false
;
*/
return
true
;
}
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
3564ee52
...
...
@@ -309,6 +309,10 @@ struct OffsetListOf : OffsetArrayOf<Type>
SANITIZE_DEBUG
();
return
OffsetArrayOf
<
Type
>::
sanitize
(
SANITIZE_ARG
,
CONST_CHARP
(
this
));
}
inline
bool
sanitize
(
SANITIZE_ARG_DEF
,
unsigned
int
user_data
)
{
SANITIZE_DEBUG
();
return
OffsetArrayOf
<
Type
>::
sanitize
(
SANITIZE_ARG
,
CONST_CHARP
(
this
),
user_data
);
}
};
typedef
OffsetListOf
<
Lookup
>
LookupList
;
...
...
src/hb-ot-layout-gdef-private.hh
浏览文件 @
3564ee52
...
...
@@ -201,12 +201,12 @@ struct LigGlyph
inline
bool
sanitize
(
SANITIZE_ARG_DEF
)
{
SANITIZE_DEBUG
();
return
SANITIZE
(
carets
);
return
SANITIZE
_THIS
(
carets
);
}
private:
OffsetArrayOf
<
CaretValue
>
carets
;
/* Offset
r
rray of CaretValue tables
carets
;
/* Offset
a
rray of CaretValue tables
* --from beginning of LigGlyph table
* --in increasing coordinate order */
};
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
3564ee52
...
...
@@ -1024,7 +1024,7 @@ typedef AnchorMatrix LigatureAttach; /* component-major--
* ordered by class--zero-based. */
ASSERT_SIZE
(
LigatureAttach
,
2
);
typedef
Offset
Array
Of
<
LigatureAttach
>
LigatureArray
;
typedef
Offset
List
Of
<
LigatureAttach
>
LigatureArray
;
/* Array of LigatureAttach
* tables ordered by
* LigatureCoverage Index */
...
...
@@ -1063,7 +1063,7 @@ struct MarkLigPosFormat1
const
MarkArray
&
mark_array
=
this
+
markArray
;
const
LigatureArray
&
lig_array
=
this
+
ligatureArray
;
const
LigatureAttach
&
lig_attach
=
&
lig_array
+
lig_array
[
lig_index
];
const
LigatureAttach
&
lig_attach
=
lig_array
[
lig_index
];
/* Find component to attach to */
count
=
lig_attach
.
rows
;
...
...
@@ -1108,7 +1108,7 @@ struct MarkLigPosFormat1
SANITIZE_DEBUG
();
return
SANITIZE_SELF
()
&&
SANITIZE_THIS2
(
markCoverage
,
ligatureCoverage
)
&&
SANITIZE_THIS
2
(
markArray
,
ligatureArray
);
SANITIZE_THIS
(
markArray
)
&&
ligatureArray
.
sanitize
(
SANITIZE_ARG
,
CONST_CHARP
(
this
),
classCount
);
}
private:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录