freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] [services] FT_Size_Reset_Func to return


From: Ben Wagner (@bungeman)
Subject: [Git][freetype/freetype][master] [services] FT_Size_Reset_Func to return FT_Error
Date: Wed, 19 Apr 2023 18:15:24 +0000

Ben Wagner pushed to branch master at FreeType / FreeType

Commits:

  • 8154d8e2
    by Ben Wagner at 2023-04-19T13:48:59-04:00
    [services] FT_Size_Reset_Func to return FT_Error
    
    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`.
    

1 changed file:

Changes:

  • include/freetype/internal/services/svmetric.h
    ... ... @@ -77,7 +77,7 @@ FT_BEGIN_HEADER
    77 77
       typedef void
    
    78 78
       (*FT_Metrics_Adjust_Func)( FT_Face  face );
    
    79 79
     
    
    80
    -  typedef void
    
    80
    +  typedef FT_Error
    
    81 81
       (*FT_Size_Reset_Func)( FT_Size  size );
    
    82 82
     
    
    83 83
     
    


  • reply via email to

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