fontconfig: Branch 'main'

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

 



 src/fcint.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 06929a556fdc39c8fe12965b69070c8df520a33e
Author: Tom Anderson <thomasanderson@xxxxxxxxxxxx>
Date:   Fri Feb 10 23:53:15 2023 +0000

    Fix false-positive CFI failure
    
    When building Chromium with upstream Fontconfig with CFI,
    the following build error is raised:
    
    ../../third_party/fontconfig/src/src/fchash.c:105:21: runtime error:
    control flow integrity check for type 'unsigned int (const void *)'
    failed during indirect function call
    
    This occurs because CFI doesn't like the conversion from
    `unsigned int (const void *)` to `unsigned int (const char *)`.
    To fix this, simply redefine `FcHashFunc` to use `char *` instead.

diff --git a/src/fcint.h b/src/fcint.h
index 78cee54..0c5f5e7 100644
--- a/src/fcint.h
+++ b/src/fcint.h
@@ -408,8 +408,8 @@ typedef struct _FcStrBuf {
 
 typedef struct _FcHashTable	FcHashTable;
 
-typedef FcChar32 (* FcHashFunc)	   (const void *data);
-typedef int	 (* FcCompareFunc) (const void *v1, const void *v2);
+typedef FcChar32 (* FcHashFunc)	   (const FcChar8 *data);
+typedef int	 (* FcCompareFunc) (const FcChar8 *v1, const FcChar8 *v2);
 typedef FcBool	 (* FcCopyFunc)	   (const void *src, void **dest);
 
 



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux