]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
simplified decrypted data allocation.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 26 Jul 2013 18:10:55 +0000 (20:10 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 26 Jul 2013 18:10:55 +0000 (20:10 +0200)
lib/gnutls_record.c

index cc0d5f7ca55506de4450be6cb10b65a45e2d0cf5..ffe5f4681a2fba5df60dbd159c244ec1258a9e5c 100644 (file)
@@ -1181,8 +1181,7 @@ begin:
   /* We allocate the maximum possible to allow few compressed bytes to expand to a
    * full record.
    */
-  t.size = get_max_decrypted_data(session);
-  decrypted = _mbuffer_alloc(t.size, t.size);
+  decrypted = _mbuffer_alloc(record.length, record.length);
   if (decrypted == NULL)
     return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);