/soc/2015/koosha/main: 2582598d5af0: Make sure new 'h' is bigger...

Koosha Khajehmoogahi <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 2582598d5af0a0d0503f0ee1407547af528a0944
Author:	 Koosha Khajehmoogahi <[email protected]>
Date:	 2015-08-17 20:33 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/koosha/main/rev/2582598d5af0

Description:

Make sure new 'h' is bigger than the old one when receiving acks

diffstat:

 libpurple/protocols/jabber/sm.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff --git a/libpurple/protocols/jabber/sm.c b/libpurple/protocols/jabber/sm.c
--- a/libpurple/protocols/jabber/sm.c
+++ b/libpurple/protocols/jabber/sm.c
@@ -187,6 +187,8 @@ static void remove_old_packets_from_buff
 {
 	guint32 i;
 
+	g_return_if_fail(h > js->sm->last_acked_stanza);
+
 	for (i = js->sm->last_acked_stanza + 1; i <= h; i++)
 		g_hash_table_remove(js->sm->packets_buffer, &i);
 

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.