Don't pass NULL to memcpy
This commit is contained in:
parent
5ad753b90c
commit
61dda40b44
|
@ -5640,10 +5640,12 @@ ssize_t nghttp2_session_mem_recv(nghttp2_session *session, const uint8_t *in,
|
||||||
|
|
||||||
readlen = inbound_frame_payload_readlen(iframe, in, last);
|
readlen = inbound_frame_payload_readlen(iframe, in, last);
|
||||||
|
|
||||||
|
if (readlen > 0) {
|
||||||
iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
|
iframe->lbuf.last = nghttp2_cpymem(iframe->lbuf.last, in, readlen);
|
||||||
|
|
||||||
iframe->payloadleft -= readlen;
|
iframe->payloadleft -= readlen;
|
||||||
in += readlen;
|
in += readlen;
|
||||||
|
}
|
||||||
|
|
||||||
DEBUGF(fprintf(stderr, "recv: readlen=%zu, payloadleft=%zu\n", readlen,
|
DEBUGF(fprintf(stderr, "recv: readlen=%zu, payloadleft=%zu\n", readlen,
|
||||||
iframe->payloadleft));
|
iframe->payloadleft));
|
||||||
|
|
Loading…
Reference in New Issue