Bug 24212 - Crashes when given the URI of a directory, or other non-regular files
Summary: Crashes when given the URI of a directory, or other non-regular files
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Gustavo Noronha (kov)
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2009-02-26 15:39 PST by Gustavo Noronha (kov)
Modified: 2009-03-01 08:22 PST (History)
0 users

See Also:


Attachments
proposed fix (1.92 KB, patch)
2009-02-26 15:40 PST, Gustavo Noronha (kov)
zecke: review+
Details | Formatted Diff | Diff
errors cleanup (3.73 KB, patch)
2009-03-01 07:51 PST, Gustavo Noronha (kov)
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Noronha (kov) 2009-02-26 15:39:14 PST
The crash happens because in this specific case an error is reported, but the GError that is given to networkErrorForFile is NULL, and error->message is accessed unconditionally.
Comment 1 Gustavo Noronha (kov) 2009-02-26 15:40:13 PST
Created attachment 28049 [details]
proposed fix
Comment 2 Holger Freyther 2009-03-01 07:26:50 PST
Comment on attachment 28049 [details]
proposed fix

Yeah. we leak the GError in the caller though.
Comment 3 Gustavo Noronha (kov) 2009-03-01 07:51:35 PST
Created attachment 28143 [details]
errors cleanup
Comment 4 Holger Freyther 2009-03-01 08:12:19 PST
Comment on attachment 28143 [details]
errors cleanup

looks good, please split it in two parts.
Comment 5 Gustavo Noronha (kov) 2009-03-01 08:22:24 PST
Landed as r41332 and r41333.