mirror of
https://github.com/nginx/nginx.git
synced 2026-10-21 19:41:35 +00:00
ngx_sprintf() has implicit limit of 65536 bytes so on Linux/ppc64
in 32-bit mode the errstr is somewhere at 0xffffd680, the "last" overflows and ngx_vsnprintf() does not print at all
This commit is contained in:
parent
f4b34c4754
commit
18d6514eb5
1 changed files with 4 additions and 3 deletions
|
|
@ -92,13 +92,14 @@ ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
|
|||
|
||||
p = errstr + ngx_cached_err_log_time.len;
|
||||
|
||||
p = ngx_sprintf(p, " [%s] ", err_levels[level]);
|
||||
p = ngx_snprintf(p, last - p, " [%s] ", err_levels[level]);
|
||||
|
||||
/* pid#tid */
|
||||
p = ngx_sprintf(p, "%P#" NGX_TID_T_FMT ": ", ngx_log_pid, ngx_log_tid);
|
||||
p = ngx_snprintf(p, last - p, "%P#" NGX_TID_T_FMT ": ",
|
||||
ngx_log_pid, ngx_log_tid);
|
||||
|
||||
if (log->connection) {
|
||||
p = ngx_sprintf(p, "*%uA ", log->connection);
|
||||
p = ngx_snprintf(p, last - p, "*%uA ", log->connection);
|
||||
}
|
||||
|
||||
#if (NGX_HAVE_VARIADIC_MACROS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue