[PATCH] SSL: fixed $ssl_curves allocation error handling
Sergey Kandaurov
pluknet at nginx.com
Fri Jan 26 10:36:29 UTC 2024
# HG changeset patch
# User Sergey Kandaurov <pluknet at nginx.com>
# Date 1706265240 -14400
# Fri Jan 26 14:34:00 2024 +0400
# Node ID 2f70dd17c16461f833eafec2dcf9193557bfb176
# Parent ee40e2b1d0833b46128a357fbc84c6e23be9be07
SSL: fixed $ssl_curves allocation error handling.
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -5187,6 +5187,9 @@ ngx_ssl_get_curves(ngx_connection_t *c,
}
curves = ngx_palloc(pool, n * sizeof(int));
+ if (curves == NULL) {
+ return NGX_ERROR;
+ }
n = SSL_get1_curves(c->ssl->connection, curves);
len = 0;
More information about the nginx-devel
mailing list