We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bf86450 + f94eb68 commit 7245ad0Copy full SHA for 7245ad0
src/ssl_sess.c
@@ -2827,12 +2827,20 @@ WOLFSSL_SESSION* wolfSSL_d2i_SSL_SESSION(WOLFSSL_SESSION** sess,
2827
goto end;
2828
}
2829
s->chain.count = data[idx++];
2830
+ if (s->chain.count > MAX_CHAIN_DEPTH) {
2831
+ ret = BUFFER_ERROR;
2832
+ goto end;
2833
+ }
2834
for (j = 0; j < s->chain.count; j++) {
2835
if (i - idx < OPAQUE16_LEN) {
2836
ret = BUFFER_ERROR;
2837
2838
2839
ato16(data + idx, &length); idx += OPAQUE16_LEN;
2840
+ if (length > MAX_X509_SIZE) {
2841
2842
2843
2844
s->chain.certs[j].length = length;
2845
if (i - idx < length) {
2846
0 commit comments