Ticket #410: valgrind-falsepositive-with-ngx_string-len-0.patch
| File valgrind-falsepositive-with-ngx_string-len-0.patch, 739 bytes (added by , 13 years ago) |
|---|
-
src/core/ngx_string.c
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c index d3ff368..56839b1 100644
a b ngx_vslprintf(u_char *buf, u_char *last, const char *fmt, va_list args) 233 233 v = va_arg(args, ngx_str_t *); 234 234 235 235 len = ngx_min(((size_t) (last - buf)), v->len); 236 buf = ngx_cpymem(buf, v->data, len); 236 /* valgrind falsepositive if len is 0 */ 237 if (len) { 238 buf = ngx_cpymem(buf, v->data, len); 239 } 237 240 fmt++; 238 241 239 242 continue;
