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
3aaef64d3d
commit
962f253d1b
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue