diff options
Diffstat (limited to 'external/fontconfig/ubsan.patch')
-rw-r--r-- | external/fontconfig/ubsan.patch | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/external/fontconfig/ubsan.patch b/external/fontconfig/ubsan.patch index 5951f09fe6dd..91586b093480 100644 --- a/external/fontconfig/ubsan.patch +++ b/external/fontconfig/ubsan.patch @@ -9,3 +9,14 @@ /* * Scan file files to build font patterns +--- src/fcserialize.c ++++ src/fcserialize.c +@@ -163,7 +163,7 @@ + size_t old_used = serialize->buckets_used; + size_t old_count = serialize->buckets_count; + FcSerializeBucket *old_buckets = serialize->buckets; +- FcSerializeBucket *old_buckets_end = old_buckets + old_count; ++ FcSerializeBucket *old_buckets_end = old_count == 0 ? old_buckets : old_buckets + old_count; + + FcSerializeBucket *new_buckets = malloc (new_count * sizeof (*old_buckets)); + if (!new_buckets) |