Mercurial > hg > nginx-quic
comparison src/http/v2/ngx_http_v2.c @ 8590:29795b697e14
HTTP/2: avoid memcpy() with NULL source and zero length.
Prodded by Clang Static Analyzer.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 31 Aug 2021 16:44:13 +0300 |
parents | 9cf043a5d9ca |
children | 2245324a507a |
comparison
equal
deleted
inserted
replaced
8589:09d15a2dbc6b | 8590:29795b697e14 |
---|---|
4239 | 4239 |
4240 if (n > size) { | 4240 if (n > size) { |
4241 n = size; | 4241 n = size; |
4242 } | 4242 } |
4243 | 4243 |
4244 rb->buf->last = ngx_cpymem(rb->buf->last, pos, n); | 4244 if (n > 0) { |
4245 rb->buf->last = ngx_cpymem(rb->buf->last, pos, n); | |
4246 } | |
4245 | 4247 |
4246 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0, | 4248 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, fc->log, 0, |
4247 "http2 request body recv %uz", n); | 4249 "http2 request body recv %uz", n); |
4248 | 4250 |
4249 pos += n; | 4251 pos += n; |