Clamp the initial vector capacity for active source nodes
In BaseAudioContext::PerformCleanupOnMainThread, a vector is created for active source nodes and then its internal storage is swapped after the inactive source nodes are removed. This speculative fix clamps the capacity of the vector into the range between 0 and the current total active source nodes counts. My guess is in some cases the subtraction of these two unsigned values can be wrapped around to a huge number causing a crash with OOM. Bug: 814108 Change-Id: Id69979119a7d2f44de1be35fc0b27e7b39a6ed06 Reviewed-on: https://chromium-review.googlesource.com/963483 Commit-Queue: Hongchan Choi <hongchan@chromium.org> Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#543559}
Showing
Please register or sign in to comment