Skip to content

Commit dbb48e3

Browse files
committed
bugfix: segmentation fault might happen in ssl_session_fetch_by_lua*, caught by the clang static analyzer.
1 parent 5b2e1d2 commit dbb48e3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ngx_http_lua_ssl_session_fetchby.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ ngx_http_lua_ssl_sess_fetch_handler(ngx_ssl_conn_t *ssl_conn, u_char *id,
215215
#ifdef SSL_ERROR_PENDING_SESSION
216216
return SSL_magic_pending_session_ptr();
217217
#else
218-
ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
218+
ngx_log_error(NGX_LOG_CRIT, c->log, 0,
219219
"lua: cannot yield in sess get cb: "
220220
"missing async sess get cb support in OpenSSL");
221221
return NULL;
@@ -349,7 +349,7 @@ ngx_http_lua_ssl_sess_fetch_handler(ngx_ssl_conn_t *ssl_conn, u_char *id,
349349
#ifdef SSL_ERROR_PENDING_SESSION
350350
return SSL_magic_pending_session_ptr();
351351
#else
352-
ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
352+
ngx_log_error(NGX_LOG_CRIT, c->log, 0,
353353
"lua: cannot yield in sess get cb: "
354354
"missing async sess get cb support in OpenSSL");
355355

0 commit comments

Comments
 (0)