[Pidgin] #8706: Crittical error in in circbuffer implementation
Pidgin
trac at pidgin.im
Tue Mar 17 05:09:57 EDT 2009
#8706: Crittical error in in circbuffer implementation
------------------------+---------------------------------------------------
Reporter: ajosea | Type: defect
Status: new | Component: libpurple
Version: 2.5.5 | Keywords: circbuffer
Launchpad_bug: |
------------------------+---------------------------------------------------
Procedure grow_circ_buffer (circbuffer.c) currupts the buffer if it was
full before the call.
If buffer is full, then buf->inptr == buf->outptr. In this situation, we
also have to to shift the data.
Current situation:
{{{
69 /* If the fill pointer is wrapped to before the remove
70 * pointer, we need to shift the data */
71 if (in_offset < out_offset) {
}}}
Proposed solution:
{{{
69 /* If the fill pointer is wrapped to before the remove
70 * pointer, we need to shift the data */
71 if ((in_offset <
out_offset)||((in_offset==out_offset)&&(buf->bufused>0))) {
}}}
--
Ticket URL: <http://developer.pidgin.im/ticket/8706>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list