Bug 60777

Summary: GTK WebFontInfo should not destroy a NULL FcPattern
Product: WebKit Reporter: Brett Wilson (Google) <brettw>
Component: WebKit APIAssignee: Brett Wilson (Google) <brettw>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Patch abarth: review+

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]
Patch
Comment 2 Adam Barth 2011-05-13 09:50:18 PDT
Comment on attachment 93469 [details]
Patch

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