nghttp2_bufs_remove: Prevent NULL from being passed to memcpy
This commit is contained in:
parent
6e7d0286e3
commit
b187895e1d
|
@ -379,7 +379,11 @@ ssize_t nghttp2_bufs_remove(nghttp2_bufs *bufs, uint8_t **out)
|
|||
|
||||
for(chain = bufs->head; chain; chain = chain->next) {
|
||||
buf = &chain->buf;
|
||||
resbuf.last = nghttp2_cpymem(resbuf.last, buf->pos, nghttp2_buf_len(buf));
|
||||
|
||||
if(resbuf.last) {
|
||||
resbuf.last = nghttp2_cpymem(resbuf.last,
|
||||
buf->pos, nghttp2_buf_len(buf));
|
||||
}
|
||||
|
||||
nghttp2_buf_reset(buf);
|
||||
nghttp2_buf_shift_right(&chain->buf, bufs->offset);
|
||||
|
|
Loading…
Reference in New Issue