mirror of
https://github.com/curl/curl.git
synced 2024-12-27 06:59:43 +08:00
http2: avoid possible null pointer dereference
Reported-by: Dan Fandrich Fixes #10920 Closes #10923
This commit is contained in:
parent
309a517ffd
commit
452b8e39ef
@ -219,13 +219,15 @@ static CURLcode http2_data_setup(struct Curl_cfilter *cf,
|
||||
struct stream_ctx **pstream)
|
||||
{
|
||||
struct cf_h2_ctx *ctx = cf->ctx;
|
||||
struct stream_ctx *stream = H2_STREAM_CTX(data);
|
||||
struct stream_ctx *stream;
|
||||
|
||||
(void)cf;
|
||||
DEBUGASSERT(data);
|
||||
if(!data->req.p.http) {
|
||||
failf(data, "initialization failure, transfer not http initialized");
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
stream = H2_STREAM_CTX(data);
|
||||
if(stream) {
|
||||
*pstream = stream;
|
||||
return CURLE_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user