Index: squeeze/lib/gnutls_cipher.c
===================================================================
--- squeeze.orig/lib/gnutls_cipher.c	2012-03-25 13:27:36.922136305 +0200
+++ squeeze/lib/gnutls_cipher.c	2012-03-25 13:27:48.460965884 +0200
@@ -501,14 +501,13 @@
 	{
 	  ciphertext.size -= blocksize;
 	  ciphertext.data += blocksize;
-
-	  if (ciphertext.size == 0)
-	    {
-	      gnutls_assert ();
-	      return GNUTLS_E_DECRYPTION_FAILED;
-	    }
 	}
 
+      if (ciphertext.size < hash_size)
+	{
+	  gnutls_assert ();
+	  return GNUTLS_E_DECRYPTION_FAILED;
+	}
       pad = ciphertext.data[ciphertext.size - 1] + 1;	/* pad */
 
       if ((int) pad > (int) ciphertext.size - hash_size)
