mirror of
https://github.com/nginx/nginx.git
synced 2024-12-01 11:19:00 +08:00
A bounds check of %N format on Windows.
Thanks to Joe Bialek, Adam Zabrocki and Microsoft Vulnerability Research.
This commit is contained in:
parent
7e1eba5faa
commit
415c8ec4b4
@ -429,8 +429,12 @@ ngx_vslprintf(u_char *buf, u_char *last, const char *fmt, va_list args)
|
||||
case 'N':
|
||||
#if (NGX_WIN32)
|
||||
*buf++ = CR;
|
||||
#endif
|
||||
if (buf < last) {
|
||||
*buf++ = LF;
|
||||
}
|
||||
#else
|
||||
*buf++ = LF;
|
||||
#endif
|
||||
fmt++;
|
||||
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user