[parser] Clear scope_snapshot_ upon parser destruction to avoid use-after-(recent)free
|scope_snapshot_| might not have been cleared if there was a parser error between setting the snapshot and consuming it. Explicitly clear it at the end of parsing for that case. Otherwise Scope::Snapshot's destructor will possibly write into the already freed zone. Bug: chromium:909976 Change-Id: I8469d11f04e7f71528be5cba5663c652cd7eacb2 Reviewed-on: https://chromium-review.googlesource.com/c/1354880 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#57938}
Showing
Please
register
or
sign in
to comment