commit | a9f6ff59c548006580ccd06f1dd48b8366941ef5 | [log] [tgz] |
---|---|---|
author | Austin Sullivan <asully@chromium.org> | Wed Oct 12 20:49:34 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Oct 12 20:49:34 2022 |
tree | 8c481f36f30b2ce05abd64fa272c60015f5c14b3 | |
parent | 877734d95c2c8a1ac4436e2c6ab168e7b78d02ef [diff] |
FSA: Fix null-deref in getDirectory() Haven't tested locally, but the discussion on the bug suggests a very straightforward fix. Clusterfuzz can verify this accordingly (or not). Bug: 1252866 Change-Id: I2bf6f51f51b0c70074230500bfa4e5af5c71cecd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3949714 Reviewed-by: Christine Smith <christinesm@chromium.org> Commit-Queue: Christine Smith <christinesm@chromium.org> Auto-Submit: Austin Sullivan <asully@chromium.org> Cr-Commit-Position: refs/heads/main@{#1058252}
diff --git a/third_party/blink/renderer/modules/file_system_access/storage_manager_file_system_access.cc b/third_party/blink/renderer/modules/file_system_access/storage_manager_file_system_access.cc index e1de7f75..e77e0ef 100644 --- a/third_party/blink/renderer/modules/file_system_access/storage_manager_file_system_access.cc +++ b/third_party/blink/renderer/modules/file_system_access/storage_manager_file_system_access.cc
@@ -35,7 +35,7 @@ void GetDirectoryImpl(ScriptPromiseResolver* resolver, bool allow_access) { ExecutionContext* context = resolver->GetExecutionContext(); - if (!resolver->GetScriptState()->ContextIsValid()) + if (!context || !resolver->GetScriptState()->ContextIsValid()) return; if (!allow_access) {