mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +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 {
|
} else {
|
||||||
buf = ngx_cpymem(buf, p, slen);
|
len = (buf + slen < last) ? slen : (size_t) (last - buf);
|
||||||
|
|
||||||
|
buf = ngx_cpymem(buf, p, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt++;
|
fmt++;
|
||||||
|
Loading…
Reference in New Issue
Block a user