mirror of
https://github.com/nginx/nginx.git
synced 2026-08-27 04:07:18 +00:00
limit string length
This commit is contained in:
parent
fb42465646
commit
16315761db
1 changed files with 3 additions and 1 deletions
|
|
@ -227,7 +227,9 @@ ngx_vsnprintf(u_char *buf, size_t max, const char *fmt, va_list args)
|
|||
}
|
||||
|
||||
} else {
|
||||
buf = ngx_cpymem(buf, p, slen);
|
||||
len = (buf + slen < last) ? slen : (size_t) (last - buf);
|
||||
|
||||
buf = ngx_cpymem(buf, p, len);
|
||||
}
|
||||
|
||||
fmt++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue