Skip to content

[services] FT_Size_Reset_Func to return FT_Error

Ben Wagner requested to merge bungeman/freetype:fix_cfi_return into master

The MetricsVariations FT_Size_Reset_Func is currently defined to return void, but the implementations return FT_Error. Even though the pointers passed will be the same at runtime, calling a function through a pointer of a different type from the original function pointer type is undefined behavior. This may be caught at runtime by Control Flow Integrity with something like clang's cfi-icall.

Issue: https://crbug.com/1433651

  • include/freetype/internal/services/svmetric.h (FT_Size_Reset_Func): return FT_Error instead of void.

Merge request reports