pidgin: aaa07bde: Ignore short packets related to p2pv2.
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Sun Dec 26 23:12:55 EST 2010
----------------------------------------------------------------------
Revision: aaa07bde3c51d3684391ae6ed86b6dbaeab5d031
Parent: e76f4ad4ef2f10588195a0eedc7a08f82062f79c
Author: qulogic at pidgin.im
Date: 12/26/10 22:08:45
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/aaa07bde3c51d3684391ae6ed86b6dbaeab5d031
Changelog:
Ignore short packets related to p2pv2.
Changes against parent e76f4ad4ef2f10588195a0eedc7a08f82062f79c
patched libpurple/protocols/msn/directconn.c
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c 7a76dbe79a1ed015eaa07b804c0095bb34fdd34d
+++ libpurple/protocols/msn/directconn.c 32286b5d07e593f2c5b6044c121f7a8b1c37c25c
@@ -601,8 +601,10 @@ msn_dc_process_packet(MsnDirectConn *dc,
if (dc->header.length) {
part = msn_slpmsgpart_new_from_data(dc->in_buffer + 4, dc->header.length);
- msn_slplink_process_msg(dc->slplink, part);
- msn_slpmsgpart_unref(part);
+ if (part) {
+ msn_slplink_process_msg(dc->slplink, part);
+ msn_slpmsgpart_unref(part);
+ }
}
/*
@@ -674,7 +676,7 @@ msn_dc_recv_cb(gpointer data, gint fd, P
if (dc->in_pos < 4 + packet_length)
return;
- if (dc->state != DC_STATE_FOO) {
+ if (dc->state != DC_STATE_FOO && packet_length >= P2P_PACKET_HEADER_SIZE) {
MsnP2PHeader *context;
/* Skip packet size */
More information about the Commits
mailing list