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
62666
Callers should be robust against WebImage::create() returning an image with a null snapshot
https://bugs.webkit.org/show_bug.cgi?id=62666
Summary
Callers should be robust against WebImage::create() returning an image with a...
John Sullivan
Reported
2011-06-14 15:04:35 PDT
We’ve seen some crashes caused by dereferencing a WebImage->bitmap(); the callers are assuming that WebImage->bitmap() will never return null, but it can return null in at least some cases where it can’t allocate enough memory. We should make the callers robust by having them check for null. In Radar as <
rdar://problem/9606676
>
Attachments
Patch that makes the callers of WebImage check for a null bitmap before dereferencing the bitmap
(3.61 KB, patch)
2011-06-14 15:13 PDT
,
John Sullivan
no flags
Details
Formatted Diff
Diff
Patch
(3.30 KB, patch)
2011-06-14 19:41 PDT
,
Sam Weinig
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
John Sullivan
Comment 1
2011-06-14 15:13:08 PDT
Created
attachment 97169
[details]
Patch that makes the callers of WebImage check for a null bitmap before dereferencing the bitmap
mitz
Comment 2
2011-06-14 15:15:53 PDT
Assuming a change log
John Sullivan
Comment 3
2011-06-14 15:17:28 PDT
I forgot to add the ChangeLog before uploading the patch, but I will commit it along with the patch.
John Sullivan
Comment 4
2011-06-14 15:18:38 PDT
Fixed in
http://trac.webkit.org/changeset/88856
Sam Weinig
Comment 5
2011-06-14 18:53:49 PDT
This patch wasn't quite right. We shouldn't be null checking arguments to API functions. I will post a follow up patch in a moment.
Sam Weinig
Comment 6
2011-06-14 19:41:52 PDT
Created
attachment 97222
[details]
Patch
Sam Weinig
Comment 7
2011-06-14 22:29:13 PDT
Committed
r88906
: <
http://trac.webkit.org/changeset/88906
>
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