@@ -30,10 +30,10 @@ index 8e9b110bb3..3a2407b0e4 100644
30
30
# define TLSEXT_TYPE_compress_certificate 27
31
31
32
32
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
33
- index 295b719ff2..7bfc9e2eb0 100644
33
+ index 295b719ff2..c3df123253 100644
34
34
--- a/ssl/ssl_lib.c
35
35
+++ 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)
37
37
return 0;
38
38
}
39
39
@@ -105,9 +105,9 @@ index 295b719ff2..7bfc9e2eb0 100644
105
105
+ ptr += num;
106
106
+
107
107
+ /* groups */
108
- + num = PACKET_remaining (groups);
109
- + if (groups && num > 0) {
110
- +
108
+ + if (groups
109
+ + && ( num = PACKET_remaining(groups)) > 0)
110
+ + {
111
111
+ if (ossl_unlikely((ptr + num + sizeof(uint16_t)) > end))
112
112
+ return 0;
113
113
+ memcpy(ptr, PACKET_data(groups), num);
@@ -121,8 +121,9 @@ index 295b719ff2..7bfc9e2eb0 100644
121
121
+ }
122
122
+
123
123
+ /* formats */
124
- + num = PACKET_remaining(formats);
125
- + if (formats && num > 0) {
124
+ + if (formats
125
+ + && (num = PACKET_remaining(formats)) > 0)
126
+ + {
126
127
+ if (ossl_unlikely((ptr + num + sizeof(uint8_t)) > end))
127
128
+ return 0;
128
129
+ memcpy(ptr, PACKET_data(formats), num);
0 commit comments