Changeset 254576 in webkit


Ignore:
Timestamp:
Jan 15, 2020 10:40:56 AM (4 years ago)
Author:
achristensen@apple.com
Message:

Null Ptr Deref @ WebCore::DocumentLoader::clearMainResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=206204

Source/WebCore:

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-01-15
Reviewed by Alex Christensen.

Test: loader/change-src-during-iframe-load-crash.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::frameLoader const):
(WebCore::DocumentLoader::clearMainResourceLoader):

LayoutTests:

Added a NULL pointer check for FrameLoader. If FramLoader is NULL then return instead of
accessing activeDocumentLoader.

Patch by Pinki Gyanchandani <pgyanchandani@apple.com> on 2020-01-15
Reviewed by Alex Christensen.

  • loader/change-src-during-iframe-load-crash-expected.txt: Added.
  • loader/change-src-during-iframe-load-crash.html: Added.
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r254574 r254576  
     12020-01-15  Pinki Gyanchandani  <pgyanchandani@apple.com>
     2
     3        Null Ptr Deref @ WebCore::DocumentLoader::clearMainResourceLoader
     4        https://bugs.webkit.org/show_bug.cgi?id=206204
     5
     6        Added a NULL pointer check for FrameLoader. If FramLoader is NULL then return instead of
     7        accessing activeDocumentLoader.
     8
     9        Reviewed by Alex Christensen.
     10
     11        * loader/change-src-during-iframe-load-crash-expected.txt: Added.
     12        * loader/change-src-during-iframe-load-crash.html: Added.
     13
    1142020-01-15  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/LayoutTests/http/tests/security/http-0.9/xhr-blocked-expected.txt

    r208732 r254576  
     1asdf
    12ALERT: PASS
    23
  • trunk/Source/WebCore/ChangeLog

    r254574 r254576  
     12020-01-15  Pinki Gyanchandani  <pgyanchandani@apple.com>
     2
     3        Null Ptr Deref @ WebCore::DocumentLoader::clearMainResourceLoader
     4        https://bugs.webkit.org/show_bug.cgi?id=206204
     5
     6        Reviewed by Alex Christensen.
     7
     8        Test: loader/change-src-during-iframe-load-crash.html
     9
     10        * loader/DocumentLoader.cpp:
     11        (WebCore::DocumentLoader::frameLoader const):
     12        (WebCore::DocumentLoader::clearMainResourceLoader):
     13
    1142020-01-15  Jer Noble  <jer.noble@apple.com>
    215
  • trunk/Source/WebCore/loader/DocumentLoader.cpp

    r254087 r254576  
    12731273    m_loadingMainResource = false;
    12741274
    1275     if (this == frameLoader()->activeDocumentLoader())
     1275    auto* frameLoader = this->frameLoader();
     1276    if (!frameLoader)
     1277        return;
     1278
     1279    if (this == frameLoader->activeDocumentLoader())
    12761280        checkLoadComplete();
    12771281}
Note: See TracChangeset for help on using the changeset viewer.