未验证 提交 42357401 编写于 作者: O openharmony_ci 提交者: Gitee

!17 CVE漏洞修复

Merge pull request !17 from sunman4/OpenHarmony-3.0-LTS
......@@ -3264,6 +3264,9 @@
if ( !face )
return FT_THROW( Invalid_Face_Handle );
if ( !face->size )
return FT_THROW( Invalid_Size_Handle );
if ( !req || req->width < 0 || req->height < 0 ||
req->type >= FT_SIZE_REQUEST_TYPE_MAX )
return FT_THROW( Invalid_Argument );
......
......@@ -553,7 +553,7 @@
face_index = FT_ABS( face_instance_index ) & 0xFFFF;
/* value -(N+1) requests information on index N */
if ( face_instance_index < 0 )
if ( face_instance_index < 0 && face_index > 0)
face_index--;
if ( face_index >= face->ttc_header.count )
......
......@@ -2098,7 +2098,7 @@
/* Validate requested face index. */
*num_faces = woff2.num_fonts;
/* value -(N+1) requests information on index N */
if ( *face_instance_index < 0 )
if ( *face_instance_index < 0 && face_index > 0)
face_index--;
if ( face_index >= woff2.num_fonts )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册