[Webkit-unassigned] [Bug 60594] New: Protect self in [WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 10 16:06:43 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=60594

           Summary: Protect self in [WebCoreResourceHandleAsDelegate
                    connection:didReceiveDataArray:]
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Platform
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: psolanki at apple.com
                CC: ap at webkit.org


In [WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:], we do

       for (NSData *data in dataArray)
           m_handle->client()->didReceiveData(m_handle, static_cast<const char*>([data bytes]), [data length], static_cast<int>([data length]));

However, in the didReceiveData() callback, the client can cancel the load which would result in the delegate (self) being freed. This means we could crash in the subsequent iteration of the loop.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list