Bug 60777 - GTK WebFontInfo should not destroy a NULL FcPattern
Summary: GTK WebFontInfo should not destroy a NULL FcPattern
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Linux
: P2 Normal
Assignee: Brett Wilson (Google)
Depends on:
Reported: 2011-05-13 09:25 PDT by Brett Wilson (Google)
Modified: 2011-05-13 09:56 PDT (History)
0 users

See Also:

Patch (1.20 KB, patch)
2011-05-13 09:46 PDT, Brett Wilson (Google)
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Wilson (Google) 2011-05-13 09:25:43 PDT
WebFontInfo returns early if there is no match, but it still tries to do FcPatternDestroy on the NULL pointer, which causes a crash.
Comment 1 Brett Wilson (Google) 2011-05-13 09:46:14 PDT
Created attachment 93469 [details]
Comment 2 Adam Barth 2011-05-13 09:50:18 PDT
Comment on attachment 93469 [details]

I should beat you up for a test.
Comment 3 Brett Wilson (Google) 2011-05-13 09:53:45 PDT
Re no tests: I don't know how to repro this in a test. I've only seen this happen when there's a problem with the sandbox. I think it will also happen if FontConfig's config files are missing or messed up. It doesn't seem to happen in a normal environment.
Comment 4 Brett Wilson (Google) 2011-05-13 09:56:36 PDT
Fixed in r86439