[chaotic-good] Fix fuzzer found crash in server transport code (#36852)

Closes #36852

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36852 from ctiller:f-st 5ffc88a71f
PiperOrigin-RevId: 641300922
This commit is contained in:
Craig Tiller 2024-06-07 11:03:49 -07:00 committed by Copybara-Service
parent a07d3d09b7
commit 347f2a8a4b
2 changed files with 18 additions and 7 deletions

View File

@ -443,13 +443,10 @@ void ChaoticGoodServerListener::ActiveConnection::HandshakingState::
Timestamp ChaoticGoodServerListener::ActiveConnection::HandshakingState::
GetConnectionDeadline() {
if (connection_->args().Contains(GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS)) {
return Timestamp::Now() +
connection_->args()
.GetDurationFromIntMillis(GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS)
.value();
}
return Timestamp::Now() + kConnectionDeadline;
return Timestamp::Now() +
connection_->args()
.GetDurationFromIntMillis(GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS)
.value_or(kConnectionDeadline);
}
void ChaoticGoodServerListener::Orphan() {

View File

@ -0,0 +1,14 @@
network_input {
input_segments {
segments {
header {
}
}
}
}
channel_args {
args {
key: "grpc.server_handshake_timeout_ms"
str: "65537"
}
}