Skip to content

Commit cabca4b

Browse files
zerone0xclaude
andcommitted
quic: guard against null impl_ in UpdateDataStats
When a QUIC session's handshake fails or the connection is terminated early, UpdateDataStats() can be called before impl_ has been initialized, leading to a null pointer dereference and SIGSEGV. Add an early return when impl_ is nullptr to prevent the crash. Fixes: #62057 Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a06e789 commit cabca4b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/quic/session.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,6 +2232,7 @@ void Session::ExtendOffset(size_t amount) {
22322232
}
22332233

22342234
void Session::UpdateDataStats() {
2235+
if (!impl_) return;
22352236
Debug(this, "Updating data stats");
22362237
auto& stats_ = impl_->stats_;
22372238
ngtcp2_conn_info info;

0 commit comments

Comments
 (0)