fontconfig: Branch 'main' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 29 03:30:59 UTC 2025
fc-fontations/mod.rs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 09ee17b858c0ed4e6c3c63e6329fc7b6bbb1be34
Merge: ce17401 692f9ab
Author: Akira TAGOH <akira at tagoh.org>
Date: Tue Jul 29 03:30:56 2025 +0000
Merge branch 'uafFix' into 'main'
[Fontations] Remaining fix for UaF
See merge request fontconfig/fontconfig!456
commit 692f9ab828e0901d80c8bc0ee6d82acefe5926cb
Author: Dominik Röttsches <drott at chromium.org>
Date: Thu Jul 24 11:50:49 2025 +0300
[Fontations] Remaining fix for UaF
While the CString stayed alive now, the .map_or() call consumes
the CString, when called without .as_ref().
diff --git a/fc-fontations/mod.rs b/fc-fontations/mod.rs
index b7ac9e7..b7715e6 100644
--- a/fc-fontations/mod.rs
+++ b/fc-fontations/mod.rs
@@ -242,7 +242,9 @@ fn build_patterns_for_font(
unsafe {
let langset = FcLangSetWrapper::from_raw(FcLangSetFromCharSet(
charset.as_ptr(),
- exclusive_lang.map_or(std::ptr::null(), |lang| lang.as_bytes_with_nul().as_ptr()),
+ exclusive_lang
+ .as_ref()
+ .map_or(std::ptr::null(), |lang| lang.as_bytes_with_nul().as_ptr()),
));
pattern.append_element(PatternElement::new(
More information about the Fontconfig
mailing list