File CVE-2012-1573.patch of Package gnutls.383

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
@@ -501,13 +501,13 @@ _gnutls_ciphertext2compressed (gnutls_se
 	{
 	  ciphertext.size -= blocksize;
 	  ciphertext.data += blocksize;
+	}
 
-	  if (ciphertext.size == 0)
-	    {
+      if (ciphertext.size < hash_size)
+      {
 	      gnutls_assert ();
 	      return GNUTLS_E_DECRYPTION_FAILED;
-	    }
-	}
+      }
 
       pad = ciphertext.data[ciphertext.size - 1] + 1;	/* pad */
openSUSE Build Service is sponsored by