mirror of
https://github.com/curl/curl.git
synced 2026-07-28 04:53:08 +03:00
lib: fix null ptr derefs and uninitialized vars (h2/h3)
Fixing compiler warnings with gcc 13.2.0 in unity builds. Assisted-by: Jay Satiro Assisted-by: Stefan Eissing Closes #11739
This commit is contained in:
parent
51686e0054
commit
d50fe6becb
4 changed files with 33 additions and 20 deletions
|
|
@ -1814,10 +1814,10 @@ out:
|
|||
}
|
||||
|
||||
static ssize_t stream_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
struct stream_ctx *stream,
|
||||
char *buf, size_t len, CURLcode *err)
|
||||
{
|
||||
struct cf_h2_ctx *ctx = cf->ctx;
|
||||
struct stream_ctx *stream = H2_STREAM_CTX(data);
|
||||
ssize_t nread = -1;
|
||||
|
||||
*err = CURLE_AGAIN;
|
||||
|
|
@ -1937,7 +1937,7 @@ static ssize_t cf_h2_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
|
||||
CF_DATA_SAVE(save, cf, data);
|
||||
|
||||
nread = stream_recv(cf, data, buf, len, err);
|
||||
nread = stream_recv(cf, data, stream, buf, len, err);
|
||||
if(nread < 0 && *err != CURLE_AGAIN)
|
||||
goto out;
|
||||
|
||||
|
|
@ -1946,7 +1946,7 @@ static ssize_t cf_h2_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
|
|||
if(*err)
|
||||
goto out;
|
||||
|
||||
nread = stream_recv(cf, data, buf, len, err);
|
||||
nread = stream_recv(cf, data, stream, buf, len, err);
|
||||
}
|
||||
|
||||
if(nread > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue