Changeset 91157 in webkit


Ignore:
Timestamp:
Jul 16, 2011 4:29:29 PM (13 years ago)
Author:
psolanki@apple.com
Message:

SubresourceLoader::didReceiveDataArray can crash when calling m_client->didReceiveData()
https://bugs.webkit.org/show_bug.cgi?id=64656
<rdar://problem/9754425>

Reviewed by Alexey Proskuryakov.

  • loader/cf/SubresourceLoaderCF.cpp:

(WebCore::SubresourceLoader::didReceiveDataArray): Check for m_client before calling
m_client->didReceiveData().

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r91155 r91157  
     12011-07-16  Pratik Solanki  <psolanki@apple.com>
     2
     3        SubresourceLoader::didReceiveDataArray can crash when calling m_client->didReceiveData()
     4        https://bugs.webkit.org/show_bug.cgi?id=64656
     5        <rdar://problem/9754425>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        * loader/cf/SubresourceLoaderCF.cpp:
     10        (WebCore::SubresourceLoader::didReceiveDataArray): Check for m_client before calling
     11        m_client->didReceiveData().
     12
    1132011-07-16  Dinu Jacob  <dinu.jacob@nokia.com>
    214
  • trunk/Source/WebCore/loader/cf/SubresourceLoaderCF.cpp

    r81710 r91157  
    4141    // A subresource loader does not load multipart sections progressively.
    4242    // So don't deliver any data to the loader yet.
    43     if (!m_loadingMultipartContent && m_client) {
     43    if (!m_loadingMultipartContent) {
    4444        CFIndex arrayCount = CFArrayGetCount(dataArray);
    4545        for (CFIndex i = 0; i < arrayCount; ++i)  {
     46            if (!m_client)
     47                break;
    4648            CFDataRef data = reinterpret_cast<CFDataRef>(CFArrayGetValueAtIndex(dataArray, i));
    4749            m_client->didReceiveData(this, reinterpret_cast<const char *>(CFDataGetBytePtr(data)), static_cast<int>(CFDataGetLength(data)));
Note: See TracChangeset for help on using the changeset viewer.