diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-08-28 15:18:16 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-08-28 15:18:16 +0000 |
commit | 15df99617cf6d1f8998f385bd18a78dabbf62130 (patch) | |
tree | 61c4392da8a86bff517ecd242d92f4c3ba4f7939 | |
parent | 5d6634457b2661837886b77037dc9cd51cb15e54 (diff) | |
download | gnutls-15df99617cf6d1f8998f385bd18a78dabbf62130.tar.gz |
Corrected possible bug in decompression code. Well compressed packets may have been rejected due to limited buffer.
-rw-r--r-- | lib/gnutls_record.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index e76307e884..c2a68d90e9 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -763,9 +763,11 @@ ssize_t gnutls_recv_int( GNUTLS_STATE state, ContentType type, HandshakeType hty _gnutls_io_clear_read_buffer( state); ciphertext = &recv_data[header_size]; - /* decrypt the data we got + /* decrypt the data we got. We allocate MAX_RECORD_RECV_SIZE + * because we cannot predict the output data by the record + * packet length (due to compression). */ - tmplen = length + MAX_RECORD_OVERHEAD; + tmplen = MAX_RECORD_RECV_SIZE; tmpdata = gnutls_alloca( tmplen); if (tmpdata==NULL) { gnutls_assert(); |