Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
b1576176
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
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看板
提交
b1576176
编写于
5月 06, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove the last of SANITIZE macros: SANITIZE_SELF
上级
4f252fed
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
41 addition
and
38 deletion
+41
-38
src/hb-open-file-private.hh
src/hb-open-file-private.hh
+2
-2
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+12
-9
src/hb-ot-layout-common-private.hh
src/hb-ot-layout-common-private.hh
+8
-8
src/hb-ot-layout-gdef-private.hh
src/hb-ot-layout-gdef-private.hh
+3
-3
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gpos-private.hh
+13
-13
src/hb-ot-layout-gsubgpos-private.hh
src/hb-ot-layout-gsubgpos-private.hh
+3
-3
未找到文件。
src/hb-open-file-private.hh
浏览文件 @
b1576176
...
@@ -51,7 +51,7 @@ typedef struct TableDirectory
...
@@ -51,7 +51,7 @@ typedef struct TableDirectory
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
Tag
tag
;
/* 4-byte identifier. */
Tag
tag
;
/* 4-byte identifier. */
...
@@ -100,7 +100,7 @@ typedef struct OffsetTable
...
@@ -100,7 +100,7 @@ typedef struct OffsetTable
public:
public:
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
context
->
check_array
(
tableDir
,
TableDirectory
::
get_size
(),
numTables
);
&&
context
->
check_array
(
tableDir
,
TableDirectory
::
get_size
(),
numTables
);
}
}
...
...
src/hb-open-type-private.hh
浏览文件 @
b1576176
...
@@ -202,7 +202,6 @@ struct hb_sanitize_context_t
...
@@ -202,7 +202,6 @@ struct hb_sanitize_context_t
{
{
bool
overflows
=
len
>=
((
unsigned
int
)
-
1
)
/
record_size
;
bool
overflows
=
len
>=
((
unsigned
int
)
-
1
)
/
record_size
;
if
(
HB_DEBUG_SANITIZE
&&
(
int
)
this
->
debug_depth
<
(
int
)
HB_DEBUG_SANITIZE
)
if
(
HB_DEBUG_SANITIZE
&&
(
int
)
this
->
debug_depth
<
(
int
)
HB_DEBUG_SANITIZE
)
fprintf
(
stderr
,
"SANITIZE(%p) %-*d-> array [%p..%p] (%d*%d=%ld bytes) in [%p..%p] -> %s
\n
"
,
\
fprintf
(
stderr
,
"SANITIZE(%p) %-*d-> array [%p..%p] (%d*%d=%ld bytes) in [%p..%p] -> %s
\n
"
,
\
base
,
base
,
...
@@ -214,6 +213,12 @@ struct hb_sanitize_context_t
...
@@ -214,6 +213,12 @@ struct hb_sanitize_context_t
return
likely
(
!
overflows
&&
this
->
check_range
(
base
,
record_size
*
len
));
return
likely
(
!
overflows
&&
this
->
check_range
(
base
,
record_size
*
len
));
}
}
template
<
typename
Type
>
inline
bool
check_struct
(
const
Type
*
obj
)
const
{
return
likely
(
this
->
check_range
(
obj
,
sizeof
(
*
obj
)));
}
inline
bool
can_edit
(
const
char
*
base
HB_UNUSED
,
unsigned
int
len
HB_UNUSED
)
inline
bool
can_edit
(
const
char
*
base
HB_UNUSED
,
unsigned
int
len
HB_UNUSED
)
{
{
this
->
edit_count
++
;
this
->
edit_count
++
;
...
@@ -238,8 +243,6 @@ struct hb_sanitize_context_t
...
@@ -238,8 +243,6 @@ struct hb_sanitize_context_t
};
};
#define SANITIZE_SELF() likely(context->check_range (this, sizeof (*this)))
/* Template to sanitize an object. */
/* Template to sanitize an object. */
template
<
typename
Type
>
template
<
typename
Type
>
...
@@ -352,7 +355,7 @@ struct IntType
...
@@ -352,7 +355,7 @@ struct IntType
inline
bool
operator
!=
(
const
IntType
<
Type
>
&
o
)
const
{
return
v
!=
o
.
v
;
}
inline
bool
operator
!=
(
const
IntType
<
Type
>
&
o
)
const
{
return
v
!=
o
.
v
;
}
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
BEInt
<
Type
,
sizeof
(
Type
)
>
v
;
private:
BEInt
<
Type
,
sizeof
(
Type
)
>
v
;
};
};
...
@@ -414,7 +417,7 @@ struct FixedVersion
...
@@ -414,7 +417,7 @@ struct FixedVersion
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
USHORT
major
;
USHORT
major
;
...
@@ -441,7 +444,7 @@ struct GenericOffsetTo : OffsetType
...
@@ -441,7 +444,7 @@ struct GenericOffsetTo : OffsetType
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
SANITIZE_SELF
(
))
return
false
;
if
(
!
context
->
check_struct
(
this
))
return
false
;
unsigned
int
offset
=
*
this
;
unsigned
int
offset
=
*
this
;
if
(
unlikely
(
!
offset
))
return
true
;
if
(
unlikely
(
!
offset
))
return
true
;
Type
&
obj
=
StructAtOffset
<
Type
>
(
*
CharP
(
base
),
offset
);
Type
&
obj
=
StructAtOffset
<
Type
>
(
*
CharP
(
base
),
offset
);
...
@@ -450,7 +453,7 @@ struct GenericOffsetTo : OffsetType
...
@@ -450,7 +453,7 @@ struct GenericOffsetTo : OffsetType
template
<
typename
T
>
template
<
typename
T
>
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
,
T
user_data
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
,
T
user_data
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
SANITIZE_SELF
(
))
return
false
;
if
(
!
context
->
check_struct
(
this
))
return
false
;
unsigned
int
offset
=
*
this
;
unsigned
int
offset
=
*
this
;
if
(
unlikely
(
!
offset
))
return
true
;
if
(
unlikely
(
!
offset
))
return
true
;
Type
&
obj
=
StructAtOffset
<
Type
>
(
*
CharP
(
base
),
offset
);
Type
&
obj
=
StructAtOffset
<
Type
>
(
*
CharP
(
base
),
offset
);
...
@@ -547,7 +550,7 @@ struct GenericArrayOf
...
@@ -547,7 +550,7 @@ struct GenericArrayOf
private:
private:
inline
bool
sanitize_shallow
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize_shallow
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
context
->
check_array
(
this
,
Type
::
get_size
(),
len
);
&&
context
->
check_array
(
this
,
Type
::
get_size
(),
len
);
}
}
...
@@ -615,7 +618,7 @@ struct HeadlessArrayOf
...
@@ -615,7 +618,7 @@ struct HeadlessArrayOf
{
return
len
.
get_size
()
+
(
len
?
len
-
1
:
0
)
*
Type
::
get_size
();
}
{
return
len
.
get_size
()
+
(
len
?
len
-
1
:
0
)
*
Type
::
get_size
();
}
inline
bool
sanitize_shallow
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize_shallow
(
hb_sanitize_context_t
*
context
)
{
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
context
->
check_array
(
this
,
Type
::
get_size
(),
len
);
&&
context
->
check_array
(
this
,
Type
::
get_size
(),
len
);
}
}
...
...
src/hb-ot-layout-common-private.hh
浏览文件 @
b1576176
...
@@ -55,7 +55,7 @@ struct Record
...
@@ -55,7 +55,7 @@ struct Record
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
offset
.
sanitize
(
context
,
base
);
&&
offset
.
sanitize
(
context
,
base
);
}
}
...
@@ -166,7 +166,7 @@ struct LangSys
...
@@ -166,7 +166,7 @@ struct LangSys
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
featureIndex
.
sanitize
(
context
);
&&
featureIndex
.
sanitize
(
context
);
}
}
...
@@ -235,7 +235,7 @@ struct Feature
...
@@ -235,7 +235,7 @@ struct Feature
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
lookupIndex
.
sanitize
(
context
);
&&
lookupIndex
.
sanitize
(
context
);
}
}
...
@@ -287,7 +287,7 @@ struct Lookup
...
@@ -287,7 +287,7 @@ struct Lookup
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
/* Real sanitize of the subtables is done by GSUB/GPOS/... */
/* Real sanitize of the subtables is done by GSUB/GPOS/... */
if
(
!
(
SANITIZE_SELF
(
)
if
(
!
(
context
->
check_struct
(
this
)
&&
likely
(
subTable
.
sanitize
(
context
))))
return
false
;
&&
likely
(
subTable
.
sanitize
(
context
))))
return
false
;
if
(
unlikely
(
lookupFlag
&
LookupFlag
::
UseMarkFilteringSet
))
if
(
unlikely
(
lookupFlag
&
LookupFlag
::
UseMarkFilteringSet
))
{
{
...
@@ -363,7 +363,7 @@ struct CoverageRangeRecord
...
@@ -363,7 +363,7 @@ struct CoverageRangeRecord
public:
public:
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
@@ -457,7 +457,7 @@ struct ClassDefFormat1
...
@@ -457,7 +457,7 @@ struct ClassDefFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
classValue
.
sanitize
(
context
);
&&
classValue
.
sanitize
(
context
);
}
}
...
@@ -485,7 +485,7 @@ struct ClassRangeRecord
...
@@ -485,7 +485,7 @@ struct ClassRangeRecord
public:
public:
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
@@ -598,7 +598,7 @@ struct Device
...
@@ -598,7 +598,7 @@ struct Device
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
context
->
check_range
(
this
,
this
->
get_size
());
&&
context
->
check_range
(
this
,
this
->
get_size
());
}
}
...
...
src/hb-ot-layout-gdef-private.hh
浏览文件 @
b1576176
...
@@ -100,7 +100,7 @@ struct CaretValueFormat1
...
@@ -100,7 +100,7 @@ struct CaretValueFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
@@ -126,7 +126,7 @@ struct CaretValueFormat2
...
@@ -126,7 +126,7 @@ struct CaretValueFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
@@ -148,7 +148,7 @@ struct CaretValueFormat3
...
@@ -148,7 +148,7 @@ struct CaretValueFormat3
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
deviceTable
.
sanitize
(
context
,
this
);
&&
deviceTable
.
sanitize
(
context
,
this
);
}
}
...
...
src/hb-ot-layout-gpos-private.hh
浏览文件 @
b1576176
...
@@ -220,7 +220,7 @@ struct AnchorFormat1
...
@@ -220,7 +220,7 @@ struct AnchorFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
@@ -251,7 +251,7 @@ struct AnchorFormat2
...
@@ -251,7 +251,7 @@ struct AnchorFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
@@ -282,7 +282,7 @@ struct AnchorFormat3
...
@@ -282,7 +282,7 @@ struct AnchorFormat3
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
xDeviceTable
.
sanitize
(
context
,
this
)
&&
xDeviceTable
.
sanitize
(
context
,
this
)
&&
yDeviceTable
.
sanitize
(
context
,
this
);
&&
yDeviceTable
.
sanitize
(
context
,
this
);
}
}
...
@@ -346,7 +346,7 @@ struct AnchorMatrix
...
@@ -346,7 +346,7 @@ struct AnchorMatrix
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
unsigned
int
cols
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
unsigned
int
cols
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
SANITIZE_SELF
(
))
return
false
;
if
(
!
context
->
check_struct
(
this
))
return
false
;
if
(
unlikely
(
cols
>=
((
unsigned
int
)
-
1
)
/
rows
))
return
false
;
if
(
unlikely
(
cols
>=
((
unsigned
int
)
-
1
)
/
rows
))
return
false
;
unsigned
int
count
=
rows
*
cols
;
unsigned
int
count
=
rows
*
cols
;
if
(
!
context
->
check_array
(
matrix
,
matrix
[
0
].
get_size
(),
count
))
return
false
;
if
(
!
context
->
check_array
(
matrix
,
matrix
[
0
].
get_size
(),
count
))
return
false
;
...
@@ -372,7 +372,7 @@ struct MarkRecord
...
@@ -372,7 +372,7 @@ struct MarkRecord
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
void
*
base
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
markAnchor
.
sanitize
(
context
,
base
);
&&
markAnchor
.
sanitize
(
context
,
base
);
}
}
...
@@ -448,7 +448,7 @@ struct SinglePosFormat1
...
@@ -448,7 +448,7 @@ struct SinglePosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
valueFormat
.
sanitize_value
(
context
,
CharP
(
this
),
values
);
&&
valueFormat
.
sanitize_value
(
context
,
CharP
(
this
),
values
);
}
}
...
@@ -491,7 +491,7 @@ struct SinglePosFormat2
...
@@ -491,7 +491,7 @@ struct SinglePosFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
valueFormat
.
sanitize_values
(
context
,
CharP
(
this
),
values
,
valueCount
);
&&
valueFormat
.
sanitize_values
(
context
,
CharP
(
this
),
values
,
valueCount
);
}
}
...
@@ -563,7 +563,7 @@ struct PairSet
...
@@ -563,7 +563,7 @@ struct PairSet
/* Note: Doesn't sanitize the Device entries in the ValueRecord */
/* Note: Doesn't sanitize the Device entries in the ValueRecord */
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
unsigned
int
format_len
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
,
unsigned
int
format_len
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
SANITIZE_SELF
(
))
return
false
;
if
(
!
context
->
check_struct
(
this
))
return
false
;
unsigned
int
count
=
(
1
+
format_len
)
*
len
;
unsigned
int
count
=
(
1
+
format_len
)
*
len
;
return
context
->
check_array
(
array
,
USHORT
::
get_size
(),
count
);
return
context
->
check_array
(
array
,
USHORT
::
get_size
(),
count
);
}
}
...
@@ -630,7 +630,7 @@ struct PairPosFormat1
...
@@ -630,7 +630,7 @@ struct PairPosFormat1
unsigned
int
len1
=
valueFormat1
.
get_len
();
unsigned
int
len1
=
valueFormat1
.
get_len
();
unsigned
int
len2
=
valueFormat2
.
get_len
();
unsigned
int
len2
=
valueFormat2
.
get_len
();
if
(
!
(
SANITIZE_SELF
(
)
if
(
!
(
context
->
check_struct
(
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
likely
(
pairSet
.
sanitize
(
context
,
CharP
(
this
),
len1
+
len2
))))
return
false
;
&&
likely
(
pairSet
.
sanitize
(
context
,
CharP
(
this
),
len1
+
len2
))))
return
false
;
...
@@ -715,7 +715,7 @@ struct PairPosFormat2
...
@@ -715,7 +715,7 @@ struct PairPosFormat2
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
(
SANITIZE_SELF
(
)
if
(
!
(
context
->
check_struct
(
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
coverage
.
sanitize
(
context
,
this
)
&&
classDef1
.
sanitize
(
context
,
this
)
&&
classDef1
.
sanitize
(
context
,
this
)
&&
classDef2
.
sanitize
(
context
,
this
)))
return
false
;
&&
classDef2
.
sanitize
(
context
,
this
)))
return
false
;
...
@@ -1084,7 +1084,7 @@ struct MarkBasePosFormat1
...
@@ -1084,7 +1084,7 @@ struct MarkBasePosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
markCoverage
.
sanitize
(
context
,
this
)
&&
markCoverage
.
sanitize
(
context
,
this
)
&&
baseCoverage
.
sanitize
(
context
,
this
)
&&
baseCoverage
.
sanitize
(
context
,
this
)
&&
markArray
.
sanitize
(
context
,
this
)
&&
markArray
.
sanitize
(
context
,
this
)
...
@@ -1208,7 +1208,7 @@ struct MarkLigPosFormat1
...
@@ -1208,7 +1208,7 @@ struct MarkLigPosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
markCoverage
.
sanitize
(
context
,
this
)
&&
markCoverage
.
sanitize
(
context
,
this
)
&&
ligatureCoverage
.
sanitize
(
context
,
this
)
&&
ligatureCoverage
.
sanitize
(
context
,
this
)
&&
markArray
.
sanitize
(
context
,
this
)
&&
markArray
.
sanitize
(
context
,
this
)
...
@@ -1311,7 +1311,7 @@ struct MarkMarkPosFormat1
...
@@ -1311,7 +1311,7 @@ struct MarkMarkPosFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
)
return
context
->
check_struct
(
this
)
&&
mark1Coverage
.
sanitize
(
context
,
this
)
&&
mark1Coverage
.
sanitize
(
context
,
this
)
&&
mark2Coverage
.
sanitize
(
context
,
this
)
&&
mark2Coverage
.
sanitize
(
context
,
this
)
&&
mark1Array
.
sanitize
(
context
,
this
)
&&
mark1Array
.
sanitize
(
context
,
this
)
...
...
src/hb-ot-layout-gsubgpos-private.hh
浏览文件 @
b1576176
...
@@ -176,7 +176,7 @@ struct LookupRecord
...
@@ -176,7 +176,7 @@ struct LookupRecord
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
USHORT
sequenceIndex
;
/* Index into current glyph
USHORT
sequenceIndex
;
/* Index into current glyph
...
@@ -443,7 +443,7 @@ struct ContextFormat3
...
@@ -443,7 +443,7 @@ struct ContextFormat3
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
if
(
!
SANITIZE_SELF
(
))
return
false
;
if
(
!
context
->
check_struct
(
this
))
return
false
;
unsigned
int
count
=
glyphCount
;
unsigned
int
count
=
glyphCount
;
if
(
!
context
->
check_array
(
coverage
,
OffsetTo
<
Coverage
>::
get_size
(),
count
))
return
false
;
if
(
!
context
->
check_array
(
coverage
,
OffsetTo
<
Coverage
>::
get_size
(),
count
))
return
false
;
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
...
@@ -824,7 +824,7 @@ struct ExtensionFormat1
...
@@ -824,7 +824,7 @@ struct ExtensionFormat1
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
inline
bool
sanitize
(
hb_sanitize_context_t
*
context
)
{
TRACE_SANITIZE
();
TRACE_SANITIZE
();
return
SANITIZE_SELF
(
);
return
context
->
check_struct
(
this
);
}
}
private:
private:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录