mirror of
https://github.com/nginx/nginx.git
synced 2025-01-19 01:42:58 +08:00
limit string length
This commit is contained in:
parent
fb42465646
commit
16315761db
@ -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…
Reference in New Issue
Block a user