Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>
authorHuzaifa Sidhpurwala <huzaifas@redhat.com>
Wed, 2 Feb 2011 07:22:08 +0000 (12:52 +0530)
committerHuzaifa Sidhpurwala <huzaifas@redhat.com>
Wed, 2 Feb 2011 07:22:08 +0000 (12:52 +0530)
commitea2b740ac7c78831183dd57123e3a8b074c9c293
treeafd6ce0e5b1bb3865876800b03512a58ea1c3c03
parent3c4b78b3968ca4e68ac74bac52332e55bcf415b5
Backport crash fix by Huzaifa Sidhpurwala <huzaifas@redhat.com>

    WebCore: ImageDecoderSkia.cpp needs to check for allocator failure when copying
    bitmaps.
    https://bugs.webkit.org/show_bug.cgi?id=46437

    Reviewed by James Robinson.

    * manual-tests/large-size-image-crash.html: Added.
    * manual-tests/resources/large-size-image-crash.gif: Added.
    * platform/image-decoders/ImageDecoder.cpp:
    (WebCore::RGBA32Buffer::copyBitmapData):
    * platform/image-decoders/ImageDecoder.h:
    * platform/image-decoders/gif/GIFImageDecoder.cpp:
    (WebCore::GIFImageDecoder::initFrameBuffer):
    * platform/image-decoders/qt/RGBA32BufferQt.cpp:
    (WebCore::RGBA32Buffer::copyBitmapData):
    * platform/image-decoders/skia/ImageDecoderSkia.cpp:
    (WebCore::RGBA32Buffer::copyBitmapData):

    LayoutTests: This resource should have been in r62399; without it the test no-ops.
    https://bugs.webkit.org/show_bug.cgi?id=41487

    Reviewed by James Robinson.

    * fast/images/resources/large-size-image-crash.jpeg: Added.

    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/images/resources/large-size-image-crash.jpeg [new file with mode: 0644]
WebCore/manual-tests/large-size-image-crash.html [new file with mode: 0644]
WebCore/manual-tests/resources/large-size-image-crash.gif [new file with mode: 0644]
WebCore/platform/image-decoders/ImageDecoder.cpp
WebCore/platform/image-decoders/ImageDecoder.h
WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp