diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index ed311bca..fdac7835 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -1385,6 +1385,11 @@ int send_data_callback(nghttp2_session *session, nghttp2_frame *frame, auto http2session = static_cast(user_data); auto sd = static_cast( nghttp2_session_get_stream_user_data(session, frame->hd.stream_id)); + + if (sd == nullptr) { + return NGHTTP2_ERR_TEMPORAL_CALLBACK_FAILURE; + } + auto dconn = sd->dconn; auto downstream = dconn->get_downstream(); auto input = downstream->get_request_buf();