Changeset 181174 in webkit


Ignore:
Timestamp:
Mar 6, 2015 11:31:16 AM (9 years ago)
Author:
jer.noble@apple.com
Message:

[Web Audio] Decoding specific .m4a file crashes tab
https://bugs.webkit.org/show_bug.cgi?id=139545

Reviewed by Eric Carlson.

Source/WebCore:

Test: webaudio/decode-audio-data-too-short.html

Bail out early if CoreAudio reports the number of frames in the file to be negative.

  • platform/audio/mac/AudioFileReaderMac.cpp:

(WebCore::AudioFileReader::createBus):

LayoutTests:

  • webaudio/decode-audio-data-too-short-expected.txt: Added.
  • webaudio/decode-audio-data-too-short.html: Added.
  • webaudio/resources/media/too-short.m4a: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r181172 r181174  
     12015-03-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Web Audio] Decoding specific .m4a file crashes tab
     4        https://bugs.webkit.org/show_bug.cgi?id=139545
     5
     6        Reviewed by Eric Carlson.
     7
     8        * webaudio/decode-audio-data-too-short-expected.txt: Added.
     9        * webaudio/decode-audio-data-too-short.html: Added.
     10        * webaudio/resources/media/too-short.m4a: Added.
     11
    1122015-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r181173 r181174  
     12015-03-06  Jer Noble  <jer.noble@apple.com>
     2
     3        [Web Audio] Decoding specific .m4a file crashes tab
     4        https://bugs.webkit.org/show_bug.cgi?id=139545
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: webaudio/decode-audio-data-too-short.html
     9
     10        Bail out early if CoreAudio reports the number of frames in the file to be negative.
     11
     12        * platform/audio/mac/AudioFileReaderMac.cpp:
     13        (WebCore::AudioFileReader::createBus):
     14
    1152015-03-06  Jeremy Jones  <jeremyj@apple.com>
    216
  • trunk/Source/WebCore/platform/audio/mac/AudioFileReaderMac.cpp

    r165676 r181174  
    148148    size = sizeof(numberOfFrames64);
    149149    result = ExtAudioFileGetProperty(m_extAudioFileRef, kExtAudioFileProperty_FileLengthFrames, &size, &numberOfFrames64);
    150     if (result != noErr)
     150    if (result != noErr || numberOfFrames64 <= 0)
    151151        return 0;
    152152
Note: See TracChangeset for help on using the changeset viewer.