diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-12 15:56:52 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-05-12 15:56:52 +0000 |
commit | 00b967d35b6f0b04d6b01fabd66be38c1ae49e35 (patch) | |
tree | e4bf42f247a9edbb0d282fd1dc9a03dddf099ae5 | |
parent | da53d2012183825fc8c8e5aee6458e779cb9853d (diff) | |
parent | 8b2307fe0e1c46304baaa076990522b7aa14d883 (diff) | |
download | freetype-android-platform-11.0.0_r32.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/22327241'] into rvc-platform-release.android-platform-11.0.0_r32
Change-Id: I404a82665611c30bcd2ff451fa9facc335358f50
-rw-r--r-- | src/base/ftobjs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index e301f8f11..70ba6e749 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2389,6 +2389,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 ) @@ -3244,6 +3253,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 ); |