Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 05f28e19b1ed6095b1bb74a1a7ceb09c > files > 8

gnutls-2.10.5-2.3.mga1.src.rpm

Index: gnutls-2.8.6/lib/gnutls_cipher.c
===================================================================
--- gnutls-2.8.6.orig/lib/gnutls_cipher.c
+++ gnutls-2.8.6/lib/gnutls_cipher.c
@@ -541,7 +541,12 @@ _gnutls_ciphertext2compressed (gnutls_se
     }
 
   if (length < 0)
-    length = 0;
+  {
+	  /* Setting a proper length to prevent timing differences in
+	   * processing of records with invalid encryption.
+	   */
+	  length = ciphertext.size - hash_size;
+  }
   c_length = _gnutls_conv_uint16 ((uint16_t) length);
 
   /* Pass the type, version, length and compressed through