Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP7:GA
fonttosfnt
0019-handle-empty-foundry-encoded-as-NULL.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0019-handle-empty-foundry-encoded-as-NULL.patch of Package fonttosfnt
From 4d418c1602c8b939d3e5e479c44985a505ecad83 Mon Sep 17 00:00:00 2001 From: Christopher Zimmermann <madroach@gmerlin.de> Date: Fri, 23 Oct 2020 21:35:24 +0200 Subject: [PATCH] handle empty foundry encoded as NULL to fix a segfault --- read.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/read.c b/read.c index 2d41e33..6b41ba5 100644 --- a/read.c +++ b/read.c @@ -250,8 +250,14 @@ readFile(char *filename, FontPtr font) rc = FT_Get_BDF_Property(face, "FOUNDRY", &prop); if(rc == 0 && prop.type == BDF_PROPERTY_TYPE_ATOM) { font->names[i].nid = 8; - font->names[i].size = 2 * strlen(prop.u.atom); - font->names[i].value = makeUTF16((char*)prop.u.atom); + if(prop.u.atom) { + font->names[i].size = 2 * strlen(prop.u.atom); + font->names[i].value = makeUTF16((char*)prop.u.atom); + } + else { + font->names[i].size = 0; + font->names[i].value = makeUTF16(""); + } i++; } -- GitLab
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor