diff options
author | Cary Clark <cary@android.com> | 2010-05-24 10:18:52 -0400 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2010-05-24 10:18:52 -0400 |
commit | 2fd5c7a2ab77095ab6f01eb8bf1bf7f4fae39bbc (patch) | |
tree | cf3b27823c1d498eabecbd09f859afd022e8a841 /WebCore | |
parent | c9aacd00d106d418276e0cacdaa82d2c51f90e66 (diff) | |
download | external_webkit-2fd5c7a2ab77095ab6f01eb8bf1bf7f4fae39bbc.zip external_webkit-2fd5c7a2ab77095ab6f01eb8bf1bf7f4fae39bbc.tar.gz external_webkit-2fd5c7a2ab77095ab6f01eb8bf1bf7f4fae39bbc.tar.bz2 |
check for null on extremely large images
The new PrivateAndroidImageSourceRec allocator may return null
if the image sizes are extremely large. Check for this to avoid
a null deference.
Change-Id: Ia129a87a1794a2696a4e1e415a940ac2b6b50064
http://b/2689053
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/graphics/android/ImageSourceAndroid.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/ImageSourceAndroid.cpp b/WebCore/platform/graphics/android/ImageSourceAndroid.cpp index 914a9d6..c0ef611 100644 --- a/WebCore/platform/graphics/android/ImageSourceAndroid.cpp +++ b/WebCore/platform/graphics/android/ImageSourceAndroid.cpp @@ -303,7 +303,7 @@ void ImageSource::setData(SharedBuffer* data, bool allDataReceived) } PrivateAndroidImageSourceRec* decoder = m_decoder.m_image; - if (allDataReceived && !decoder->fAllDataReceived) { + if (allDataReceived && decoder && !decoder->fAllDataReceived) { decoder->fAllDataReceived = true; SkBitmap* bm = &decoder->bitmap(); |