File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Versioning](http://semver.org/spec/v2.0.0.html) except to the first release.
14
14
15
15
### Fixed
16
16
17
+ - Unchecked ` X509_STORE_CTX_get_ex_data ` return value (#16 ).
18
+
17
19
## [ v1.1.0] - 2024-09-02
18
20
19
21
The release adds more bindings.
Original file line number Diff line number Diff line change @@ -434,6 +434,10 @@ int X_SSL_new_index() {
434
434
int X_SSL_verify_cb (int ok , X509_STORE_CTX * store ) {
435
435
SSL * ssl = (SSL * )X509_STORE_CTX_get_ex_data (store ,
436
436
SSL_get_ex_data_X509_STORE_CTX_idx ());
437
+ if (ssl == NULL ) {
438
+ return 0 ;
439
+ }
440
+
437
441
void * p = SSL_get_ex_data (ssl , get_ssl_idx ());
438
442
// get the pointer to the go Ctx object and pass it back into the thunk
439
443
return go_ssl_verify_cb_thunk (p , ok , store );
@@ -557,6 +561,10 @@ long X_SSL_CTX_set_tlsext_servername_callback(
557
561
int X_SSL_CTX_verify_cb (int ok , X509_STORE_CTX * store ) {
558
562
SSL * ssl = (SSL * )X509_STORE_CTX_get_ex_data (store ,
559
563
SSL_get_ex_data_X509_STORE_CTX_idx ());
564
+ if (ssl == NULL ) {
565
+ return 0 ;
566
+ }
567
+
560
568
SSL_CTX * ssl_ctx = SSL_get_SSL_CTX (ssl );
561
569
void * p = SSL_CTX_get_ex_data (ssl_ctx , get_ssl_ctx_idx ());
562
570
// get the pointer to the go Ctx object and pass it back into the thunk
You can’t perform that action at this time.
0 commit comments