Bug 155799

Summary: Fix null dereferencing in NetworkLoad::continueCanAuthenticateAgainstProtectionSpace
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Description Alex Christensen 2016-03-23 11:50:20 PDT
Fix null dereferencing in NetworkLoad::continueCanAuthenticateAgainstProtectionSpace
Comment 1 Alex Christensen 2016-03-23 11:55:02 PDT
Created attachment 274765 [details]
Patch
Comment 2 Alex Christensen 2016-03-23 12:02:09 PDT
Comment on attachment 274765 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274765&action=review

> Source/WebKit2/NetworkProcess/NetworkLoad.cpp:378
> +    if (m_handle)
> +        m_handle->continueCanAuthenticateAgainstProtectionSpace(result);

We use m_handle when using NetworkSession for blobs, and m_task for non-blob network loads.
Comment 3 Tim Horton 2016-03-23 13:21:29 PDT
Comment on attachment 274765 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=274765&action=review

> Source/WebKit2/NetworkProcess/NetworkLoad.cpp:351
>      ASSERT(m_challengeCompletionHandler);
>      auto completionHandler = WTFMove(m_challengeCompletionHandler);
> +    if (!completionHandler)
> +        return;
> +

Please find the path that gets you here. ASSERT(x) if (!x) return; is not good WebKit happiness.

>> Source/WebKit2/NetworkProcess/NetworkLoad.cpp:378
>> +        m_handle->continueCanAuthenticateAgainstProtectionSpace(result);
> 
> We use m_handle when using NetworkSession for blobs, and m_task for non-blob network loads.

This part seems fine.
Comment 4 Alex Christensen 2016-03-24 10:08:12 PDT
http://trac.webkit.org/changeset/198629