From a22e3a80a2bd2b217f9ac890236546c979ee8ab1 Mon Sep 17 00:00:00 2001 From: liuyuxiang-bear Date: Fri, 5 Aug 2022 10:54:08 +0800 Subject: [PATCH] fixed 6f6c666 from https://gitee.com/liuyuxiang-bear/third_party_freetype/pulls/28 Description: Vulnerability Remediation IssueNo: https://gitee.com/openharmony/third_party_freetype/issues/I5KDNH Feature or Bugfix: Bugfix Binary Source:No Signed-off-by: liuyuxiang --- src/base/ftobjs.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 745ad19..784e3ab 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2407,6 +2407,15 @@ #endif + /* only use lower 31 bits together with sign bit */ + if( face_index > 0 ) + face_index &= 0x7FFFFFFFL; + else + { + face_index &= 0x7FFFFFFFL; + face_index = -face_index; + } + #ifdef FT_DEBUG_LEVEL_TRACE FT_TRACE3(( "FT_Open_Face: " )); if ( face_index < 0 ) -- Gitee