diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c index 1484e1515..6720984b0 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -2054,7 +2054,8 @@ CURLcode Curl_http2_switched(struct connectdata *conn, " after upgrade: len=%zu\n", nread); - memcpy(httpc->inbuf, mem, nread); + if(nread) + memcpy(httpc->inbuf, mem, nread); httpc->inbuflen = nread; nproc = nghttp2_session_mem_recv(httpc->h2, (const uint8_t *)httpc->inbuf, |