int TLSOutStream::writeTLS(const U8* data, int length)
{
  int n;

  n = gnutls_record_send(session, data, length);
  if (n == GNUTLS_E_INTERRUPTED || n == GNUTLS_E_AGAIN)
    return 0;

  if (n < 0)
    throw TLSException("writeTLS", n);

  return n;
}
The software writes data past the end, or before the beginning, of the intended buffer.