Title: [94262] trunk/Source/WebCore
- Revision
- 94262
- Author
- [email protected]
- Date
- 2011-08-31 18:43:10 -0700 (Wed, 31 Aug 2011)
Log Message
Add defensive bounds checking for AudioNode methods
https://bugs.webkit.org/show_bug.cgi?id=67346
Reviewed by Anders Carlsson.
No new tests since this does not change _javascript_ API.
* webaudio/AudioNode.cpp:
(WebCore::AudioNode::input):
(WebCore::AudioNode::output):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (94261 => 94262)
--- trunk/Source/WebCore/ChangeLog 2011-09-01 01:31:50 UTC (rev 94261)
+++ trunk/Source/WebCore/ChangeLog 2011-09-01 01:43:10 UTC (rev 94262)
@@ -1,3 +1,16 @@
+2011-08-31 Chris Rogers <[email protected]>
+
+ Add defensive bounds checking for AudioNode methods
+ https://bugs.webkit.org/show_bug.cgi?id=67346
+
+ Reviewed by Anders Carlsson.
+
+ No new tests since this does not change _javascript_ API.
+
+ * webaudio/AudioNode.cpp:
+ (WebCore::AudioNode::input):
+ (WebCore::AudioNode::output):
+
2011-08-31 Simon Fraser <[email protected]>
TransformState.move() should be negated in the unapply code path
Modified: trunk/Source/WebCore/webaudio/AudioNode.cpp (94261 => 94262)
--- trunk/Source/WebCore/webaudio/AudioNode.cpp 2011-09-01 01:31:50 UTC (rev 94261)
+++ trunk/Source/WebCore/webaudio/AudioNode.cpp 2011-09-01 01:43:10 UTC (rev 94262)
@@ -101,12 +101,16 @@
AudioNodeInput* AudioNode::input(unsigned i)
{
- return m_inputs[i].get();
+ if (i < m_inputs.size())
+ return m_inputs[i].get();
+ return 0;
}
AudioNodeOutput* AudioNode::output(unsigned i)
{
- return m_outputs[i].get();
+ if (i < m_outputs.size())
+ return m_outputs[i].get();
+ return 0;
}
bool AudioNode::connect(AudioNode* destination, unsigned outputIndex, unsigned inputIndex)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes