File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1078,6 +1078,20 @@ static CURLcode cf_osslq_ctx_start(struct Curl_cfilter *cf,
1078
1078
goto out ;
1079
1079
}
1080
1080
1081
+ /* Type conversions, see #12861: OpenSSL wants an `int`, but on 64-bit
1082
+ * Win32 systems, Microsoft defines SOCKET as `unsigned long long`.
1083
+ */
1084
+ #if defined(_WIN32 ) && !defined(__LWIP_OPT_H__ ) && !defined(LWIP_HDR_OPT_H )
1085
+ if (ctx -> q .sockfd > INT_MAX ) {
1086
+ failf (data , "windows socket identifier larger than MAX_INT, "
1087
+ "unable to set in OpenSSL dgram API." );
1088
+ result = CURLE_QUIC_CONNECT_ERROR ;
1089
+ goto out ;
1090
+ }
1091
+ bio = BIO_new_dgram ((int )ctx -> q .sockfd , BIO_NOCLOSE );
1092
+ #else
1093
+ bio = BIO_new_dgram (ctx -> q .sockfd , BIO_NOCLOSE );
1094
+ #endif
1081
1095
bio = BIO_new_dgram (ctx -> q .sockfd , BIO_NOCLOSE );
1082
1096
if (!bio ) {
1083
1097
result = CURLE_OUT_OF_MEMORY ;
You can’t perform that action at this time.
0 commit comments