summaryrefslogtreecommitdiff
path: root/lib/gnutls_int.h
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-07-27 06:30:41 +0200
committerDaiki Ueno <dueno@redhat.com>2018-08-06 12:36:39 +0200
commitc4ba0c1d0123dd80d3a7751b413e6756216a866a (patch)
tree5663ed5e1a72d5f8a396e560b5f87fc2a35f415a /lib/gnutls_int.h
parentdcb6702ff6e3bf2d89cc2792222d8b21005072eb (diff)
downloadgnutls-c4ba0c1d0123dd80d3a7751b413e6756216a866a.tar.gz
buffers: handle very short fragmentation of handshake messages
If the received record doesn't even complete the handshake header (i.e., the record size < 4), keep it in a temporary buffer and let the caller receive more records. Once enough amount of data is received, move the already received records back to record_buffer and proceed to the normal processing. Fixes: #272 Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r--lib/gnutls_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index fc60f7cc3e..412bb368a1 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -1097,6 +1097,7 @@ typedef struct {
* protocol only. freed using _gnutls_handshake_io_buffer_clear();
*/
mbuffer_head_st handshake_send_buffer;
+ mbuffer_head_st handshake_header_recv_buffer;
handshake_buffer_st handshake_recv_buffer[MAX_HANDSHAKE_MSGS];
int handshake_recv_buffer_size;