[gnutls-dev] GNUTLS_E_INTERNAL_ERROR in _gnutls_ciphertext2compressed

Tim Kosse tim.kosse at filezilla-project.org
Tue Nov 13 16:47:08 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've got several reports of failing connections with
GNUTLS_E_INTERNAL_ERROR.

I could track this problem down to the end of
_gnutls_ciphertext2compressed in gnutls_cipher.cpp:

if (compress_size < length) return GNUTLS_E_INTERNAL_ERROR

In all these cases, compress_size was 16284. Length was slightly larger
by various amounts. For example 16394 was a value I could frequently
observe.

I've noticed that in get_temp_recv_buffer, the buffer gets allocated
with MAX_RECORD_RECV_SIZE bytes.

_gnutls_decompress in gnutls_compress_int.c however checks for
(compress_size > max_record_size + EXTRA_COMP_SIZE).

So shouldn't get_temp_recv_buffer allocate MAX_RECORD_RECV_SIZE +
EXTRA_COMP_SIZE?

Doing so fixed this issue in my case, though I've no idea if that's proper.

Regards,
Tim Kosse
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOcb88N9+lcqiUkURAvppAJ9E87LPMXsQeHfg2i+SW1RB99NoAACg9oxP
i0jT/tXSl+Sv1wgC6ai/QkA=
=mgHk
-----END PGP SIGNATURE-----




More information about the Gnutls-devel mailing list