Bug 126339

Summary: Path to font.config is hardcoded (non modifiable)
Product: WebKit Reporter: Lukasz Gajowy <l.gajowy>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bunhere, cdumez, commit-queue, glenn, gyuyoung.kim, ossy, rakuco
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch ossy: review-, ossy: commit-queue-

Description Lukasz Gajowy 2013-12-31 07:23:29 PST
The path to fonts.conf is hardcoded so it causes a problem when webkit is ran in other environment than it has been built. We should provide a mechanism that allows to change the path.
Comment 1 Lukasz Gajowy 2013-12-31 07:32:22 PST
Created attachment 220156 [details]
Patch
Comment 2 Grzegorz Czajkowski 2014-01-10 04:01:19 PST
Comment on attachment 220156 [details]
Patch 

View in context: https://bugs.webkit.org/attachment.cgi?id=220156&action=review

> Tools/DumpRenderTree/efl/FontManagement.cpp:132
> +    const char* fontConfigFilename = buildPath(fontConfigPath(), "fonts.conf", 0).data();

I tested it locally and it caused use-after-free condition. data() method which returns poiner to a C string is called on temporary object. Although the temporally object is destroyed we still refer to the pointer which contains wrong data.
Comment 3 Lukasz Gajowy 2014-01-16 04:22:28 PST
Created attachment 221364 [details]
Patch

Patch containing fixes due to what Grzegorz said.
Comment 4 Csaba Osztrogonác 2015-05-11 03:16:41 PDT
Comment on attachment 221364 [details]
Patch

r-, because EFL WebKit doesn't have WebKit1 port long time ago.
Do you want to port this change to WebKit2? (WTR)