pidgin: 7829ec76: Josef Andrysek noticed that there's a sc...

datallah at pidgin.im datallah at pidgin.im
Thu Mar 19 22:50:27 EDT 2009


-----------------------------------------------------------------
Revision: 7829ec76bdb008583f8da54e238c2265a1140db2
Ancestor: 99afc19a87766c3beb24ccc126de72da4fef3be9
Author: datallah at pidgin.im
Date: 2009-03-20T02:42:38
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7829ec76bdb008583f8da54e238c2265a1140db2

Modified files:
        COPYRIGHT libpurple/circbuffer.c

ChangeLog: 

Josef Andrysek noticed that there's a scenario where the PurpleCircBuffer gets
corrupted and supplied a patch to fix it.
Fixes #8706

-------------- next part --------------
============================================================
--- COPYRIGHT	7403db48da9775c3ef5a597a9cc2889859fbb885
+++ COPYRIGHT	39de45679de508f5dd401345ca744ee66e42cfd8
@@ -8,6 +8,7 @@ Matt Amato
 Dave Ahlswede
 Manuel Amador
 Matt Amato
+Josef Andrysek
 Geoffrey Antos
 Daniel Atallah
 Paul Aurich
============================================================
--- libpurple/circbuffer.c	ff2488befea20c55ab38ed306fbbec9aa083fe6e
+++ libpurple/circbuffer.c	b32995d2823f39bf7136c85dcacd246246bbde11
@@ -68,7 +68,8 @@ static void grow_circ_buffer(PurpleCircB
 
 	/* If the fill pointer is wrapped to before the remove
 	 * pointer, we need to shift the data */
-	if (in_offset < out_offset) {
+	if (in_offset < out_offset
+			|| (in_offset == out_offset && buf->bufused > 0)) {
 		int shift_n = MIN(buf->buflen - start_buflen,
 			in_offset);
 		memcpy(buf->buffer + start_buflen, buf->buffer,


More information about the Commits mailing list