limit string length

This commit is contained in:
Igor Sysoev 2008-01-24 15:18:58 +00:00
parent fb42465646
commit 16315761db

View File

@ -227,7 +227,9 @@ ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args)
} }
} else { } else {
buf = ngx_cpymem(buf, p, slen); len = (buf + slen < last) ? slen : (size_t) (last - buf);
buf = ngx_cpymem(buf, p, len);
} }
fmt++; fmt++;