Commit 22a0cccb authored by Werner Lemberg's avatar Werner Lemberg
Browse files

* src/base/ftobjs.c (ft_open_face_internal): Properly guard `face_index`.

We must ensure that the cast to `FT_Int` doesn't change the sign.

Fixes #1139.
parent 53dfdcd8
Pipeline #536063 passed with stage
in 10 minutes and 1 second
......@@ -2527,6 +2527,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 )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment