fontconfig/src
Matthias Clasen e735abcfe1 Fix a problem in FcConfigSubstitute
We were using the family names from the pattern without
copying, and this was leading to a valgrind warning:
==53167== Invalid read of size 1
==53167==    at 0x58B0238: FcStrCaseWalkerNextNonBlank (fcstr.c:198)
==53167==    by 0x58B0238: FcStrCaseWalkerNextNonBlank (fcstr.c:186)
==53167==    by 0x58B02C7: FcStrCmpIgnoreBlanksAndCase (fcstr.c:281)
==53167==    by 0x58A4D44: FcHashTableFind (fchash.c:109)
==53167==    by 0x5895E76: FamilyTableAdd (fccfg.c:1634)
==53167==    by 0x589646A: FcConfigAdd.isra.0 (fccfg.c:1823)
==53167==    by 0x58988CF: IA__FcConfigSubstituteWithPat.part.0 (fccfg.c:2228)
==53167==    by 0x55F4F1A: pango_cairo_fc_font_map_fontset_key_substitute (pangocairo-fcfontmap.c:106)
==53167==    by 0x5B88AF6: pango_fc_default_substitute (pangofc-fontmap.c:1795)
==53167==    by 0x5B88D15: pango_fc_font_map_get_patterns (pangofc-fontmap.c:1850)
==53167==    by 0x5B88FC7: pango_fc_font_map_load_fontset (pangofc-fontmap.c:1952)
==53167==    by 0x5623627: pango_font_map_load_fontset (pango-fontmap.c:161)
==53167==    by 0x5621743: pango_context_get_metrics (pango-context.c:1782)
==53167==  Address 0x150d3450 is 0 bytes inside a block of size 10 free'd
==53167==    at 0x483B9F5: free (vg_replace_malloc.c:538)
==53167==    by 0x58ABE70: FcValueListDestroy (fcpat.c:147)
==53167==    by 0x5898A08: IA__FcConfigSubstituteWithPat.part.0 (fccfg.c:2203)
==53167==    by 0x55F4F1A: pango_cairo_fc_font_map_fontset_key_substitute (pangocairo-fcfontmap.c:106)
==53167==    by 0x5B88AF6: pango_fc_default_substitute (pangofc-fontmap.c:1795)
==53167==    by 0x5B88D15: pango_fc_font_map_get_patterns (pangofc-fontmap.c:1850)
==53167==    by 0x5B88FC7: pango_fc_font_map_load_fontset (pangofc-fontmap.c:1952)
==53167==    by 0x5623627: pango_font_map_load_fontset (pango-fontmap.c:161)
==53167==    by 0x5621743: pango_context_get_metrics (pango-context.c:1782)

Use copies of the strings as keys in the hash table to avoid this.
2020-08-30 12:05:24 -04:00
..
Makefile.am Replace UUID file mechanism with per-directory 'map' attribute [v2] 2019-04-03 12:02:09 +00:00
cutout.py Add Meson build system 2020-07-31 07:26:11 +00:00
fcarch.c Fix assertion on 32bit arch 2015-10-16 17:24:22 +09:00
fcarch.h Minor 2013-08-21 14:27:16 -04:00
fcatomic.c fccompat: fix build on Windows without unistd.h 2020-07-07 03:48:34 +00:00
fcatomic.h Fix build issues regarding formatter for Win32 2020-08-06 13:02:00 +09:00
fccache.c Fix build issues regarding formatter for Win32 2020-08-06 13:02:00 +09:00
fccfg.c Fix a problem in FcConfigSubstitute 2020-08-30 12:05:24 -04:00
fccharset.c Fix undefined-behavior signed shifts 2018-01-09 11:03:31 +01:00
fccompat.c Add Meson build system 2020-07-31 07:26:11 +00:00
fcdbg.c Bug 43367 - RFE: iterator to peek objects in FcPattern 2018-05-11 20:48:30 +09:00
fcdefault.c Add FC_ORDER property into cache 2020-05-25 18:22:55 +09:00
fcdeprecate.h Export FcConfig{G,S}etRescanInverval from .so, mark as deprecated. 2007-11-04 12:20:45 -08:00
fcdir.c Guard dirent.h includes 2020-07-27 13:43:23 +00:00
fcformat.c Bug 43367 - RFE: iterator to peek objects in FcPattern 2018-05-11 20:48:30 +09:00
fcfreetype.c Fix some typos/spelling errors 2020-07-21 18:42:40 -07:00
fcfs.c Improve the performance issue on rescanning directories 2013-12-20 11:57:16 +09:00
fcftint.h Remove all training whitespaces 2010-04-12 12:19:05 -04:00
fchash.c Drop unnecessary line to include uuid.h 2019-04-03 12:02:09 +00:00
fcinit.c Fix assertion in FcFini() 2020-02-26 15:42:21 +09:00
fcint.h Fix up FC_LIKELY macros 2020-08-25 18:12:07 -04:00
fclang.c Fix some typos/spelling errors 2020-07-21 18:42:40 -07:00
fclist.c Fix some typos/spelling errors 2020-07-21 18:42:40 -07:00
fcmatch.c Fixup: Handle patterns without family 2020-08-25 12:15:45 -04:00
fcmatrix.c Remove memory accounting and reporting 2012-12-29 23:12:07 -05:00
fcmutex.h Fix build and warnings on win32 2013-01-02 17:35:56 -06:00
fcname.c Improve the performance a bit 2019-08-07 12:39:14 +00:00
fcobjs.c Fix the build issue with gperf 3.1 2017-02-23 21:39:10 +09:00
fcobjs.h Add FC_ORDER property into cache 2020-05-25 18:22:55 +09:00
fcobjshash.gperf.h Add missing license headers 2014-01-17 13:05:25 +09:00
fcpat.c Avoid a crash in FcPatternHash with ranges 2020-08-23 11:28:30 -04:00
fcptrlist.c Make a call fail on ENOMEM 2018-07-25 12:39:53 +09:00
fcrange.c Fix range comparision operators implementation 2017-09-20 13:13:35 -07:00
fcserialize.c Fix more warnings 2012-12-29 22:56:14 -05:00
fcstat.c Guard dirent.h includes 2020-07-27 13:43:23 +00:00
fcstdint.h.in Add Meson build system 2020-07-31 07:26:11 +00:00
fcstr.c Use FC_UNLIKELY 2020-08-25 12:15:45 -04:00
fcweight.c Fix the linear interpolation during weight mapping 2019-06-19 11:55:06 +02:00
fcwindows.h Fix build issues regarding formatter for Win32 2020-08-06 13:02:00 +09:00
fcxml.c Turn unknown attributes into warning 2020-08-18 04:13:21 +00:00
fontconfig.def.in Add Meson build system 2020-07-31 07:26:11 +00:00
ftglue.c Replace FT_UNUSED with FC_UNUSED. 2020-07-07 10:25:02 -04:00
ftglue.h Fix undefined-behavior signed shifts 2018-01-09 11:03:31 +01:00
makealias Allow overriding symbol visibility. 2018-01-04 15:24:16 +00:00
makealias.py Add Meson build system 2020-07-31 07:26:11 +00:00
meson.build Add Meson build system 2020-07-31 07:26:11 +00:00