merge of '2eda48021b49d821ff15e69e71fdab4c7f06de00'

Tue, 24 Jul 2007 05:53:17 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Tue, 24 Jul 2007 05:53:17 +0000
changeset 18915
5596e06696ed
parent 18889
2eda48021b49 (current diff)
parent 18913
61c4ca4f733a (diff)
child 18916
1a9971455360

merge of '2eda48021b49d821ff15e69e71fdab4c7f06de00'
and '61c4ca4f733ae7f4f461cbe6b7230889f3d906d0'

--- a/libpurple/protocols/oscar/family_locate.c	Tue Jul 24 03:52:21 2007 +0000
+++ b/libpurple/protocols/oscar/family_locate.c	Tue Jul 24 05:53:17 2007 +0000
@@ -816,7 +816,11 @@
 			 */
 			int type2, number, length2;
 
-			while (byte_stream_curpos(bs) < endpos) {
+			/*
+			 * Continue looping as long as we're able to read type2,
+			 * number, and length2.
+			 */
+			while (byte_stream_curpos(bs) + 4 <= endpos) {
 				type2 = byte_stream_get16(bs);
 				number = byte_stream_get8(bs);
 				length2 = byte_stream_get8(bs);

mercurial