Commit b187895e authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttp2_bufs_remove: Prevent NULL from being passed to memcpy

parent 6e7d0286
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment