Skip to content

Commit bd882b3

Browse files
authored
Fix of issues/63 (phuslu#64)
Possible fix of the issue. Root cause: groups & formats or/and eq to NULL for some old .Net clients
1 parent f391042 commit bd882b3

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

patches/openssl.openssl-3.4.patch

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ index 8e9b110bb3..3a2407b0e4 100644
3030
# define TLSEXT_TYPE_compress_certificate 27
3131

3232
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
33-
index 295b719ff2..7bfc9e2eb0 100644
33+
index 295b719ff2..c3df123253 100644
3434
--- a/ssl/ssl_lib.c
3535
+++ b/ssl/ssl_lib.c
36-
@@ -6641,6 +6641,107 @@ int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
36+
@@ -6641,6 +6641,108 @@ int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
3737
return 0;
3838
}
3939

@@ -105,9 +105,9 @@ index 295b719ff2..7bfc9e2eb0 100644
105105
+ ptr += num;
106106
+
107107
+ /* groups */
108-
+ num = PACKET_remaining(groups);
109-
+ if (groups && num > 0) {
110-
+
108+
+ if (groups
109+
+ && (num = PACKET_remaining(groups)) > 0)
110+
+ {
111111
+ if (ossl_unlikely((ptr + num + sizeof(uint16_t)) > end))
112112
+ return 0;
113113
+ memcpy(ptr, PACKET_data(groups), num);
@@ -121,8 +121,9 @@ index 295b719ff2..7bfc9e2eb0 100644
121121
+ }
122122
+
123123
+ /* formats */
124-
+ num = PACKET_remaining(formats);
125-
+ if (formats && num > 0) {
124+
+ if (formats
125+
+ && (num = PACKET_remaining(formats)) > 0)
126+
+ {
126127
+ if (ossl_unlikely((ptr + num + sizeof(uint8_t)) > end))
127128
+ return 0;
128129
+ memcpy(ptr, PACKET_data(formats), num);

0 commit comments

Comments
 (0)