Title: [141611] trunk/Source/WebCore
Revision
141611
Author
commit-qu...@webkit.org
Date
2013-02-01 11:00:13 -0800 (Fri, 01 Feb 2013)

Log Message

HRTFElevation segfault if a null AudioBus is returned by loadPlatformResource
https://bugs.webkit.org/show_bug.cgi?id=108504

Patch by Jesus Sanchez-Palencia <jesus.palen...@openbossa.org> on 2013-02-01
Reviewed by Kenneth Russell.

Fixed a segfault by checking if the returned AudioBus is null or not.
If it is, we should early return in the same way it was being done already
in HRTFElevation::calculateKernelsForAzimuthElevation();

No new tests, covered by existing tests.

* platform/audio/HRTFElevation.cpp:
(WebCore::getConcatenatedImpulseResponsesForSubject):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (141610 => 141611)


--- trunk/Source/WebCore/ChangeLog	2013-02-01 18:59:08 UTC (rev 141610)
+++ trunk/Source/WebCore/ChangeLog	2013-02-01 19:00:13 UTC (rev 141611)
@@ -1,3 +1,19 @@
+2013-02-01  Jesus Sanchez-Palencia  <jesus.palen...@openbossa.org>
+
+        HRTFElevation segfault if a null AudioBus is returned by loadPlatformResource
+        https://bugs.webkit.org/show_bug.cgi?id=108504
+
+        Reviewed by Kenneth Russell.
+
+        Fixed a segfault by checking if the returned AudioBus is null or not.
+        If it is, we should early return in the same way it was being done already
+        in HRTFElevation::calculateKernelsForAzimuthElevation();
+
+        No new tests, covered by existing tests.
+
+        * platform/audio/HRTFElevation.cpp:
+        (WebCore::getConcatenatedImpulseResponsesForSubject):
+
 2013-02-01  Beth Dakin  <bda...@apple.com>
 
         ScrollAnimatorMac should adopt contentAreaScrolledInDirection

Modified: trunk/Source/WebCore/platform/audio/HRTFElevation.cpp (141610 => 141611)


--- trunk/Source/WebCore/platform/audio/HRTFElevation.cpp	2013-02-01 18:59:08 UTC (rev 141610)
+++ trunk/Source/WebCore/platform/audio/HRTFElevation.cpp	2013-02-01 19:00:13 UTC (rev 141611)
@@ -78,6 +78,10 @@
     AudioBusMap::iterator iterator = audioBusMap.find(subjectName);
     if (iterator == audioBusMap.end()) {
         OwnPtr<AudioBus> concatenatedImpulseResponses = AudioBus::loadPlatformResource(subjectName.utf8().data(), ResponseSampleRate);
+        ASSERT(concatenatedImpulseResponses);
+        if (!concatenatedImpulseResponses)
+            return 0;
+
         bus = concatenatedImpulseResponses.leakPtr();
         audioBusMap.set(subjectName, bus);
     } else
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to