Blame SOURCES/gnutls-3.3.29-cbc-mac-verify-ssl3-min-pad.patch

519d7d
diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c
519d7d
index 65dde6899..8b34472b7 100644
519d7d
--- a/lib/gnutls_cipher.c
519d7d
+++ b/lib/gnutls_cipher.c
519d7d
@@ -659,7 +659,11 @@ ciphertext_to_compressed(gnutls_session_t session,
519d7d
 		 * Note that we access all 256 bytes of ciphertext for padding check
519d7d
 		 * because there is a timing channel in that memory access (in certain CPUs).
519d7d
 		 */
519d7d
-		if (ver->id != GNUTLS_SSL3)
519d7d
+		if (ver->id == GNUTLS_SSL3) {
519d7d
+			if (pad >= blocksize)
519d7d
+				pad_failed = 1;
519d7d
+		} else
519d7d
+		{
519d7d
 			for (i = 2; i <= MIN(256, ciphertext->size); i++) {
519d7d
 				tmp_pad_failed |=
519d7d
 				    (compressed->
519d7d
@@ -667,6 +671,7 @@ ciphertext_to_compressed(gnutls_session_t session,
519d7d
 				pad_failed |=
519d7d
 				    ((i <= (1 + pad)) & (tmp_pad_failed));
519d7d
 			}
519d7d
+		}
519d7d
 
519d7d
 		if (unlikely
519d7d
 		    (pad_failed != 0
519d7d
-- 
519d7d
2.14.3
519d7d