WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45849
WKURLCreateWithCFURL crashes with bad url
https://bugs.webkit.org/show_bug.cgi?id=45849
Summary
WKURLCreateWithCFURL crashes with bad url
Simon Fraser (smfr)
Reported
2010-09-15 16:39:42 PDT
I entered a bogus url into MiniBrowser's url bar, and hit return, and it crashed. URL was <
rdar://problem/999
> Crashes in WKURLCreateWithCFURL at: String urlString(CFURLGetString(cfURL)); cfURL is null.
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Fraser (smfr)
Comment 1
2010-09-15 16:42:53 PDT
Minibrowser bug I guess: diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m index 43351e5..162d99a 100644 --- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m +++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m @@ -61,6 +61,9 @@ - (void)dealloc - (IBAction)fetch:(id)sender { CFURLRef cfURL = CFURLCreateWithString(0, (CFStringRef)[urlText stringValue], 0); + if (!cfURL) + return; + WKURLRef url = WKURLCreateWithCFURL(cfURL); CFRelease(cfURL);
Simon Fraser (smfr)
Comment 2
2010-09-15 16:51:49 PDT
http://trac.webkit.org/changeset/67580
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug