mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
HTTP/2: avoid memcpy() with NULL source and zero length.
Prodded by Clang Static Analyzer.
This commit is contained in:
parent
1e8c0d4e06
commit
15bf6d8cc9
@ -4241,7 +4241,9 @@ ngx_http_v2_process_request_body(ngx_http_request_t *r, u_char *pos,
|
|||||||
n = size;
|
n = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
rb->buf->last = ngx_cpymem(rb->buf->last, pos, n);
|
if (n > 0) {
|
||||||
|
rb->buf->last = ngx_cpymem(rb->buf->last, pos, n);
|
||||||
|
}
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0,
|
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0,
|
||||||
"http2 request body recv %uz", n);
|
"http2 request body recv %uz", n);
|
||||||
|
Loading…
Reference in New Issue
Block a user