summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2019-01-17 11:52:50 +0100
committerDaiki Ueno <dueno@redhat.com>2019-01-23 16:59:49 +0100
commite33c22b68d5cc5c4140ac9d9b1d96d130c488af3 (patch)
treeb956dfe797f5524db3ffff10e33cae08818594b3 /lib
parent0d8ebf4ec05aa8f55b3cc66fabdacf25fa3cf871 (diff)
downloadgnutls-e33c22b68d5cc5c4140ac9d9b1d96d130c488af3.tar.gz
ext/record_size_limit: reject too large extension payload
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/ext/record_size_limit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ext/record_size_limit.c b/lib/ext/record_size_limit.c
index 811e2ea93f..35b5e446d2 100644
--- a/lib/ext/record_size_limit.c
+++ b/lib/ext/record_size_limit.c
@@ -54,6 +54,8 @@ _gnutls_record_size_limit_recv_params(gnutls_session_t session,
ssize_t data_size = _data_size;
DECR_LEN(data_size, 2);
+ if (data_size != 0)
+ return gnutls_assert_val(GNUTLS_E_UNEXPECTED_PACKET_LENGTH);
new_size = _gnutls_read_uint16(data);
/* protocol error */