提交 9fdec3ff 编写于 作者: Z zxt 提交者: sunman4

Description: Vulnerability Remediation

IssueNo: https://gitee.com/openharmony/third_party_freetype/issues/I56E40
Feature or Bugfix: Bugfix
Binary Source:No
Signed-off-by: Nzxt <zhangxingtai@huawei.com>
上级 d5a080cb
......@@ -3244,6 +3244,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 );
......
......@@ -528,7 +528,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 )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册