Projects
Eulaceura:Factory
libass
_service:obs_scm:backport-fontconfig-fix-minor-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-fontconfig-fix-minor-memory-leak.patch of Package libass
From 6e83137cdbaf4006439d526fef902e123129707b Mon Sep 17 00:00:00 2001 From: Oneric <oneric@oneric.stub> Date: Tue, 9 Jul 2024 18:00:37 +0200 Subject: [PATCH] fontconfig: fix minor memory leak When the used config is completely devoid of fonts FcFontSort will attempt to allocate an empty set and return it while still setting the result to invalid. Fortunately this seems unlikely to affect any real-world setups, but we should handle it correctly nevertheless. Identified-by: kasper93 --- libass/ass_fontconfig.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libass/ass_fontconfig.c b/libass/ass_fontconfig.c index 27233a74c..d1f094f24 100644 --- a/libass/ass_fontconfig.c +++ b/libass/ass_fontconfig.c @@ -105,8 +105,11 @@ static bool scan_fonts(FcConfig *config, ASS_FontProvider *provider) // trim=FcFalse returns all system fonts fonts = FcFontSort(config, pat, FcFalse, NULL, &res); FcPatternDestroy(pat); - if (res != FcResultMatch) + if (res != FcResultMatch) { + if (fonts) + FcFontSetDestroy(fonts); return false; + } // fill font_info list for (i = 0; i < fonts->nfont; i++) {
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2