summaryrefslogtreecommitdiff
path: root/lib/gnutls_extensions.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-09-08 00:12:27 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-09-08 00:12:27 +0200
commit89794af1790d8accdbda1cb422bb077c8a9cf692 (patch)
tree39e98387fef2b137ecda1b89f090fdfc1c1d1934 /lib/gnutls_extensions.c
parent7ae18e4644ae251717dd337c75911d652664732e (diff)
downloadgnutls-89794af1790d8accdbda1cb422bb077c8a9cf692.tar.gz
do not reset length
Diffstat (limited to 'lib/gnutls_extensions.c')
-rw-r--r--lib/gnutls_extensions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c
index 99238a096c..0c98f762e2 100644
--- a/lib/gnutls_extensions.c
+++ b/lib/gnutls_extensions.c
@@ -297,7 +297,7 @@ _gnutls_gen_extensions (gnutls_session_t session, gnutls_buffer_st * extdata,
if ( size > 0)
_gnutls_write_uint16(size, &extdata->data[pos]);
- else if (size == 0) extdata->length = 0;
+ else if (size == 0) extdata->length -= 2; /* the length bytes */
return size;
}