pidgin: 99b486b9: I've seen packet sizes larger than our c...
qulogic at pidgin.im
qulogic at pidgin.im
Fri May 21 18:04:02 EDT 2010
-----------------------------------------------------------------
Revision: 99b486b95f984e7c70aaf8959168ecf0c6f56bea
Ancestor: 1cd6cb6ec7b28c28d241bca77951597e06e14a92
Author: qulogic at pidgin.im
Date: 2010-05-05T08:18:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/99b486b95f984e7c70aaf8959168ecf0c6f56bea
Modified files:
libpurple/protocols/msn/directconn.c
ChangeLog:
I've seen packet sizes larger than our current maximum. Hopefully 8KiB is
big enough. Should probably test it out sometime.
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/directconn.c f2b4b2681c2173e6dbf67a7e66ffb6a67b38103d
+++ libpurple/protocols/msn/directconn.c 837c8c1040236c259504b5eb30982bee2e4273a9
@@ -43,7 +43,7 @@ typedef struct {
#pragma pack(pop)
#define DC_PACKET_HEADER_SIZE sizeof(MsnDcContext)
-#define DC_MAX_BODY_SIZE 1352
+#define DC_MAX_BODY_SIZE 8*1024
#define DC_MAX_PACKET_SIZE (DC_PACKET_HEADER_SIZE + DC_MAX_BODY_SIZE)
static void
@@ -682,8 +682,7 @@ msn_dc_recv_cb(gpointer data, gint fd, P
/* Wait for packet length */
while (dc->in_pos >= 4) {
- packet_length = *((guint32*)dc->in_buffer);
- packet_length = GUINT32_FROM_LE(packet_length);
+ packet_length = GUINT32_FROM_LE(*((guint32*)dc->in_buffer));
if (packet_length > DC_MAX_PACKET_SIZE) {
/* Oversized packet */
More information about the Commits
mailing list