diff options
-rw-r--r-- | lib/gnutls_supplemental.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gnutls_supplemental.c b/lib/gnutls_supplemental.c index 56ca1e9f8c..e515273e74 100644 --- a/lib/gnutls_supplemental.c +++ b/lib/gnutls_supplemental.c @@ -131,8 +131,8 @@ _gnutls_gen_supplemental(gnutls_session_t session, gnutls_buffer_st * buf) /* If data were added, store type+length, otherwise reset. */ if (buf->length > sizepos + 4) { - buf->data[sizepos] = 0; - buf->data[sizepos + 1] = p->type; + buf->data[sizepos] = (p->type >> 8) & 0xFF; + buf->data[sizepos + 1] = p->type & 0xFF; buf->data[sizepos + 2] = ((buf->length - sizepos - 4) >> 8) & 0xFF; buf->data[sizepos + 3] = |