From: Emilia Kasper Date: Mon, 8 Jun 2015 13:04:28 +0000 (+0200) Subject: Use CRYPTO_memcmp in s3_cbc.c X-Git-Tag: OpenSSL_1_0_2b~25 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=05627d57e55517eae21c251fe287760bd1137218 Use CRYPTO_memcmp in s3_cbc.c Reviewed-by: Rich Salz --- diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index c43402d4a1..a0edcef90a 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -149,7 +149,7 @@ int tls1_cbc_remove_padding(const SSL *s, */ if ((s->options & SSL_OP_TLS_BLOCK_PADDING_BUG) && !s->expand) { /* First packet is even in size, so check */ - if ((memcmp(s->s3->read_sequence, "\0\0\0\0\0\0\0\0", 8) == 0) && + if ((CRYPTO_memcmp(s->s3->read_sequence, "\0\0\0\0\0\0\0\0", 8) == 0) && !(padding_length & 1)) { s->s3->flags |= TLS1_FLAGS_TLS_PADDING_BUG; }