Bug 175870

Summary: [GTK] webkit_web_resource_get_data_finish() returns NULL without setting the error
Product: WebKit Reporter: Xiang Fan <sfanxiang>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Major CC: bugs-noreply, cgarcia, mcatanzaro
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugzilla.gnome.org/show_bug.cgi?id=786592
Attachments:
Description Flags
Backtrace none

Description Xiang Fan 2017-08-22 20:25:59 PDT
webkit_web_resource_get_data_finish() sometimes returns NULL without setting the error, causing a NULL dereference.

Because of this bug, Epiphany crashes if the user saves some special pages.

WebkitGTK+ version: 2.16.6

Error code:
https://trac.webkit.org/browser/webkit/trunk/Source/WebKit/UIProcess/API/glib/WebKitWebResource.cpp#L397

Example website that crashes Epiphany when saved:
https://archive.org/download/testmp3testfile/mpthreetest.mp3

Downstream bug:
https://bugzilla.gnome.org/show_bug.cgi?id=786592
Comment 1 Michael Catanzaro 2017-08-23 07:01:47 PDT
I can reproduce this crash always if I use the Save Page As context menu item. It works fine if I use Save Video As. Thanks for reporting and for finding a reproducer!
Comment 2 Michael Catanzaro 2017-08-25 21:14:12 PDT
Created attachment 319131 [details]
Backtrace
Comment 3 Michael Catanzaro 2017-08-25 21:23:21 PDT
Looks like webkit_web_resource_get_data() never sets any error. At the very least we need to return some generic error there.

Then the next question is why the resource load is failing in the first place, but that is a separate bug.
Comment 4 Carlos Garcia Campos 2017-10-04 03:44:42 PDT

*** This bug has been marked as a duplicate of bug 177107 ***