Bug 126339 - Path to font.config is hardcoded (non modifiable)
Summary: Path to font.config is hardcoded (non modifiable)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-31 07:23 PST by Lukasz Gajowy
Modified: 2015-05-11 03:16 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.97 KB, patch)
2013-12-31 07:32 PST, Lukasz Gajowy
no flags Details | Formatted Diff | Diff
Patch (4.04 KB, patch)
2014-01-16 04:22 PST, Lukasz Gajowy
ossy: review-
ossy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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)