Bug 115624

Summary: [GTK] Initialize WebKitWebPlugin path to prevent double-free
Product: WebKit Reporter: Tomas Popela <tpopela>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
none
Proposed patch v2
mrobinson: review+, mrobinson: commit-queue-
Proposed patch v3 none

Tomas Popela
Reported 2013-05-06 00:41:06 PDT
Initialize WebKitWebPlugin path in webkitwebplugin.cpp to prevent double-free on OpenBSD: https://bugzilla.gnome.org/show_bug.cgi?id=684245#c20
Attachments
Proposed patch (1.63 KB, patch)
2013-05-06 00:49 PDT, Tomas Popela
no flags
Proposed patch v2 (3.88 KB, patch)
2013-05-06 06:30 PDT, Tomas Popela
mrobinson: review+
mrobinson: commit-queue-
Proposed patch v3 (3.86 KB, patch)
2013-05-07 00:04 PDT, Tomas Popela
no flags
Tomas Popela
Comment 1 2013-05-06 00:49:02 PDT
Created attachment 200639 [details] Proposed patch
Carlos Garcia Campos
Comment 2 2013-05-06 00:58:10 PDT
Comment on attachment 200639 [details] Proposed patch Oh!, this happens because webkitwebplugin is doing new WebKitWebPluginPrivate(). I think a better fix would be to use GOwnPtr<char> for the path. GOwnPtr initializes the internal pointer on construction and you can remove all the g_free.
Tomas Popela
Comment 3 2013-05-06 06:30:51 PDT
Created attachment 200664 [details] Proposed patch v2 WebKitWebPlugin path and also error variable in webkit_web_plugin_get_path are now using GOwnPtr
WebKit Commit Bot
Comment 4 2013-05-06 06:33:09 PDT
Attachment 200664 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/gtk/ChangeLog', u'Source/WebKit/gtk/webkit/webkitwebplugin.cpp', u'Source/WebKit/gtk/webkit/webkitwebpluginprivate.h']" exit_code: 1 Source/WebKit/gtk/webkit/webkitwebpluginprivate.h:25: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Martin Robinson
Comment 5 2013-05-06 08:17:17 PDT
Comment on attachment 200664 [details] Proposed patch v2 Looks good to me, but please fix the style error.
Tomas Popela
Comment 6 2013-05-07 00:04:10 PDT
Created attachment 200877 [details] Proposed patch v3 Fixes style error.
WebKit Commit Bot
Comment 7 2013-05-07 00:41:26 PDT
Comment on attachment 200877 [details] Proposed patch v3 Clearing flags on attachment: 200877 Committed r149666: <http://trac.webkit.org/changeset/149666>
WebKit Commit Bot
Comment 8 2013-05-07 00:41:28 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.