[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] [PATCH] Correct type signature for FT_Renderer_RenderFunc

From: Vlad Tsyrklevich
Subject: [ft-devel] [PATCH] Correct type signature for FT_Renderer_RenderFunc
Date: Wed, 15 Nov 2017 12:38:54 -0800

Hello, the following patch updates the type of the 3rd argument of
FT_Renderer_RenderFunc from FT_UInt (unsigned int) to FT_Render_Mode
(enum, hence signed int) to match the implementations of
FT_Renderer_RenderFunc. This is required to enable Control Flow
Integrity for freetype in chromium because it depends on function
pointers only calling functions with matching type signatures.

diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h
index 960837580..ff05a9fc7 100644
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -88,7 +88,7 @@ FT_BEGIN_HEADER
   typedef FT_Error
   (*FT_Renderer_RenderFunc)( FT_Renderer       renderer,
                              FT_GlyphSlot      slot,
-                             FT_UInt           mode,
+                             FT_Render_Mode    mode,
                              const FT_Vector*  origin );

   typedef FT_Error

reply via email to

[Prev in Thread] Current Thread [Next in Thread]