Changeset 26102 in webkit


Ignore:
Timestamp:
Oct 7, 2007 5:14:02 PM (16 years ago)
Author:
aroben
Message:

Fix Bug 15305: Crash when dragging an image when "load images automatically" preference is off

http://bugs.webkit.org/show_bug.cgi?id=15305
<rdar://problem/5524774>

Reviewed by Eric Seidel.

No test possible: to reproduce this you have to change a WebKit

preference and reload the page. See
http://bugs.webkit.org/show_bug.cgi?id=15414

  • platform/win/ClipboardWin.cpp: (WebCore::createGlobalImageFileDescriptor): ASSERT that we have an image and that it has a SharedBuffer. (WebCore::writeImageToDataObject): The fix: null-check imageBuffer.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r26074 r26102  
     12007-10-08  Adam Roben  <aroben@apple.com>
     2
     3        Fix Bug 15305: Crash when dragging an image when "load images automatically" preference is off
     4
     5        http://bugs.webkit.org/show_bug.cgi?id=15305
     6        <rdar://problem/5524774>
     7
     8        Reviewed by Eric Seidel.
     9
     10        No test possible: to reproduce this you have to change a WebKit
     11        preference and reload the page. See
     12        http://bugs.webkit.org/show_bug.cgi?id=15414
     13
     14        * platform/win/ClipboardWin.cpp:
     15        (WebCore::createGlobalImageFileDescriptor): ASSERT that we have an
     16        image and that it has a SharedBuffer.
     17        (WebCore::writeImageToDataObject): The fix: null-check imageBuffer.
     18
    1192007-10-05  Geoffrey Garen  <ggaren@apple.com>
    220
  • trunk/WebCore/platform/win/ClipboardWin.cpp

    r25770 r26102  
    254254static HGLOBAL createGlobalImageFileDescriptor(const String& url, const String& title, CachedImage* image)
    255255{
     256    ASSERT_ARG(image, image);
     257    ASSERT(image->image()->data());
     258
    256259    HRESULT hr = S_OK;
    257260    HGLOBAL memObj = 0;
     
    566569
    567570    SharedBuffer* imageBuffer = cachedImage->image()->data();
    568     if (!imageBuffer->size())
     571    if (!imageBuffer || !imageBuffer->size())
    569572        return;
    570573
Note: See TracChangeset for help on using the changeset viewer.