Skip to content

Commit

Permalink
Merge pull request #2070 from cloudflare/kenton/rpc-fix-output-gate
Browse files Browse the repository at this point in the history
Fix UAF in recent RPC output gate change.
  • Loading branch information
ObsidianMinor committed Apr 30, 2024
2 parents 2fe7335 + bd89516 commit 855279a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/workerd/api/worker-rpc.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ public:
})));

if (ctx.hasOutputGate()) {
return result.then([this]() {
return result.then([weakIoContext = weakIoContext->addRef()]() mutable {
return KJ_REQUIRE_NONNULL(weakIoContext->tryGet()).waitForOutputLocks();
});
} else {
Expand Down

0 comments on commit 855279a

Please sign in to comment.