Changeset 142887 in webkit


Ignore:
Timestamp:
Feb 14, 2013, 9:47:36 AM (12 years ago)
Author:
tommyw@google.com
Message:

MediaStream API: RTCDataChannel triggers a use-after-free
https://bugs.webkit.org/show_bug.cgi?id=109806

Reviewed by Adam Barth.

Making sure RTCPeerConnection::stop() is always called at least once.
Also making sure that RTCDataChannels state gets set to Closed correctly.

Hard to test in WebKit but covered by Chromium tests.

  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::stop):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::~RTCPeerConnection):
(WebCore::RTCPeerConnection::stop):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r142886 r142887  
     12013-02-14  Tommy Widenflycht  <tommyw@google.com>
     2
     3        MediaStream API: RTCDataChannel triggers a use-after-free
     4        https://bugs.webkit.org/show_bug.cgi?id=109806
     5
     6        Reviewed by Adam Barth.
     7
     8        Making sure RTCPeerConnection::stop() is always called at least once.
     9        Also making sure that RTCDataChannels state gets set to Closed correctly.
     10
     11        Hard to test in WebKit but covered by Chromium tests.
     12
     13        * Modules/mediastream/RTCDataChannel.cpp:
     14        (WebCore::RTCDataChannel::stop):
     15        * Modules/mediastream/RTCPeerConnection.cpp:
     16        (WebCore::RTCPeerConnection::~RTCPeerConnection):
     17        (WebCore::RTCPeerConnection::stop):
     18
    1192013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
    220
  • trunk/Source/WebCore/Modules/mediastream/RTCDataChannel.cpp

    r137441 r142887  
    244244{
    245245    m_stopped = true;
     246    m_readyState = ReadyStateClosed;
    246247    m_handler->setClient(0);
    247248    m_scriptExecutionContext = 0;
  • trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp

    r141984 r142887  
    163163RTCPeerConnection::~RTCPeerConnection()
    164164{
     165    stop();
    165166}
    166167
     
    591592void RTCPeerConnection::stop()
    592593{
     594    if (m_stopped)
     595        return;
     596
    593597    m_stopped = true;
    594598    m_iceConnectionState = IceConnectionStateClosed;
Note: See TracChangeset for help on using the changeset viewer.