Bug 45849
| Summary: | WKURLCreateWithCFURL crashes with bad url | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
Simon Fraser (smfr)
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)
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)
http://trac.webkit.org/changeset/67580