mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 01:12:40 +08:00
SSL: handled long string truncation in ngx_ssl_error().
If no space left in buffer after adding formatting symbols, error message could be left without terminating null. The fix is to output message using actual length.
This commit is contained in:
parent
0079f29326
commit
645697f111
@ -2045,7 +2045,7 @@ ngx_ssl_error(ngx_uint_t level, ngx_log_t *log, ngx_err_t err, char *fmt, ...)
|
||||
(void) ERR_get_error();
|
||||
}
|
||||
|
||||
ngx_log_error(level, log, err, "%s)", errstr);
|
||||
ngx_log_error(level, log, err, "%*s)", p - errstr, errstr);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user