X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fsslapitest.c;h=706f277589e0964781127742bcbbfbc9216ccec3;hp=b5878570e20ea79f759b79f6d9d3c7649a9bd7e1;hb=5d99881e6a58a8775b8ca866b794f615a16bb033;hpb=c1ec4db33d0a0d95b1d7ff1cf0536df768e7c790 diff --git a/test/sslapitest.c b/test/sslapitest.c index b5878570e2..706f277589 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1819,7 +1819,7 @@ static int early_data_skip_helper(int hrr, int idx) * time. It could be any value as long as it is not within tolerance. * This should mean the ticket is rejected. */ - if (!TEST_true(SSL_SESSION_set_time(sess, time(NULL) - 20))) + if (!TEST_true(SSL_SESSION_set_time(sess, (long)(time(NULL) - 20)))) goto end; } @@ -1984,7 +1984,7 @@ static int alpn_select_cb(SSL *ssl, const unsigned char **out, for (prot = in; prot < in + inlen; prot += protlen) { protlen = *prot++; - if (in + inlen - prot < protlen) + if (in + inlen < prot + protlen) return SSL_TLSEXT_ERR_NOACK; if (protlen == strlen(servalpn)