Bug in gnutls breaking Pidgin Jabber support
Nikos Mavrogiannopoulos
nmav at gnutls.org
Tue Jun 30 20:44:29 CEST 2009
Tim Kosse wrote:
> Hi,
>
> found the problem. Happens if _gnutls_io_write_buffered gets called with
> iptr == NULL and n < session->internals.record_send_buffer.length
>
> It then gets up to n bytes from the send buffer into ptr. At that point
> session->internals.record_send_buffer still contains additional
> outstanding data.
>
> If sending fails, it pushes the remaining data from ptr to the end of
> the send buffer, causing the buffer contents to become reordered.
> Instead it should have put it to the beginning. A gnutls_buffer_prepend
> function would be needed.
>
> A workaround is to always request the complete buffer, see attached
> patch. That's identical to the behavior of older GnuTLS versions.
I did a quick hack to make a prepend function. Does this solve the issue?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.patch
Type: text/x-patch
Size: 2925 bytes
Desc: not available
URL: </pipermail/attachments/20090630/9327a98d/attachment.bin>
More information about the Gnutls-devel
mailing list