File revert-simplified-decrypted-data-allocation.patch of Package gnutls.openSUSE_13.1_Update
From c3b39817df8b45f48edd89b6e652201e986770dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BChler?= <stbuehler@web.de>
Date: Thu, 6 Feb 2014 11:13:53 +0100
Subject: [PATCH 1/1] Revert "simplified decrypted data allocation."
This reverts commit 1667d2eecd4094a239db9f5ae54990d4c270c52a.
It breaks COMP-DEFLATE as the allocated buffer is too small for the
inflated content.
Fixed upstream in 3.2.7 with commit
172ae00887559fa5ba9a3bdc41d9eccb4844b077.
---
lib/gnutls_record.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index d261585..65d5786 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -1189,7 +1189,8 @@ begin:
/* We allocate the maximum possible to allow few compressed bytes to expand to a
* full record.
*/
- decrypted = _mbuffer_alloc(record.length, record.length);
+ t.size = get_max_decrypted_data(session);
+ decrypted = _mbuffer_alloc(t.size, t.size);
if (decrypted == NULL)
return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
--
1.8.5.3