File CVE-2022-31782.patch of Package freetype2

--- a/src/ftbench.c
+++ b/src/ftbench.c
@@ -1242,6 +1242,9 @@
     if ( get_face( &face ) )
       goto Exit;
 
+    if ( !face->num_glyphs )
+      goto Exit;
+
     if ( first_index >= face->num_glyphs )
       first_index = face->num_glyphs - 1;
     if ( last_index >= face->num_glyphs )
openSUSE Build Service is sponsored by