diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-06-18 11:22:36 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-06-20 10:32:23 +0000 |
commit | 601e12472f2f533d19ee52410f89dc36543354c0 (patch) | |
tree | c1eef200d0fd400e52705eb996598a3746f733ec /lib/record.c | |
parent | 43b2762d485e4628dc23c468834585bff21f6b9f (diff) | |
download | gnutls-601e12472f2f533d19ee52410f89dc36543354c0.tar.gz |
record: fail with invalid request when attempting to send no pad and no data
Previously we were returning an internal error which seems to be incorrect
in that case.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/record.c')
-rw-r--r-- | lib/record.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/record.c b/lib/record.c index e4bfe34929..c9bf616caa 100644 --- a/lib/record.c +++ b/lib/record.c @@ -490,7 +490,7 @@ _gnutls_send_tlen_int(gnutls_session_t session, content_type_t type, retval = session->internals.record_send_buffer_user_size; } else { if (unlikely((send_data_size == 0 && min_pad == 0))) - return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); + return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); /* now proceed to packet encryption */ |