Bug 155799 - Fix null dereferencing in NetworkLoad::continueCanAuthenticateAgainstProtectionSpace
Summary: Fix null dereferencing in NetworkLoad::continueCanAuthenticateAgainstProtecti...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-23 11:50 PDT by Alex Christensen
Modified: 2016-03-24 10:08 PDT (History)
0 users

See Also:


Attachments
Patch (2.63 KB, patch)
2016-03-23 11:55 PDT, Alex Christensen
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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