Changeset 199116 in webkit


Ignore:
Timestamp:
Apr 6, 2016 2:21:47 PM (8 years ago)
Author:
jer.noble@apple.com
Message:

CRASH in AudioDestinationNode::render()
https://bugs.webkit.org/show_bug.cgi?id=156308
<rdar://problem/25468815>

Reviewed by Eric Carlson.

AudioDestinationNode::render() will crash when passed in a zero-length frame count. Rather than get into
this bad state, ASSERT() and bail out early in this case.

Also, address the situation in AudioDestinationIOS::render which can cause this 0-frame count to occur.

  • Modules/webaudio/AudioDestinationNode.cpp:

(WebCore::AudioDestinationNode::render):

  • platform/audio/ios/AudioDestinationIOS.cpp:

(WebCore::AudioDestinationIOS::render):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r199114 r199116  
     12016-04-06  Jer Noble  <jer.noble@apple.com>
     2
     3        CRASH in AudioDestinationNode::render()
     4        https://bugs.webkit.org/show_bug.cgi?id=156308
     5        <rdar://problem/25468815>
     6
     7        Reviewed by Eric Carlson.
     8
     9       
     10        AudioDestinationNode::render() will crash when passed in a zero-length frame count. Rather than get into
     11        this bad state, ASSERT() and bail out early in this case.
     12
     13        Also, address the situation in AudioDestinationIOS::render which can cause this 0-frame count to occur.
     14
     15        * Modules/webaudio/AudioDestinationNode.cpp:
     16        (WebCore::AudioDestinationNode::render):
     17        * platform/audio/ios/AudioDestinationIOS.cpp:
     18        (WebCore::AudioDestinationIOS::render):
     19
    1202016-04-06  Per Arne Vollan  <peavo@outlook.com>
    221
  • trunk/Source/WebCore/Modules/webaudio/AudioDestinationNode.cpp

    r196603 r199116  
    6969    }
    7070
     71    ASSERT(numberOfFrames);
     72    if (!numberOfFrames) {
     73        destinationBus->zero();
     74        setIsSilent(true);
     75        return;
     76    }
     77
    7178    // Let the context take care of any business at the start of each render quantum.
    7279    context().handlePreRenderTasks();
  • trunk/Source/WebCore/platform/audio/ios/AudioDestinationIOS.cpp

    r199042 r199116  
    233233        assignAudioBuffersToBus(buffers, *m_renderBus, numberOfBuffers, numberOfFrames, frameOffset, framesThisTime);
    234234
     235        if (!framesThisTime)
     236            break;
    235237        if (framesThisTime < kRenderBufferSize) {
    236238            m_callback.render(0, m_spareBus.get(), kRenderBufferSize);
Note: See TracChangeset for help on using the changeset viewer.