Validate AudioContext options before constructing the context
Previously, an AudioContext object would be constructed, and then the sample rate would be tested for validity and an error is thrown if invalid. The invalid sample rate would get passed to FFTFRame::Initialize which causes an out-of-bounds access. This is backwards. We should verify that the supplied sample rate is valid before contructing the AudioContext object. Bug: 967117 Change-Id: Ifba65666f09d823f1e84d561252ce97d5225db02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1635204 Commit-Queue: Raymond Toy <rtoy@chromium.org> Reviewed-by:Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#664396}
Showing
Please register or sign in to comment