/pidgin/main: 19f89eda8587: Fix TALOS-CAN-0118

Andrew Victor andrew.victor at mxit.com
Mon Jun 20 20:09:56 EDT 2016


Changeset: 19f89eda85875507ee37c9430bb8798f0afa5c0b
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2016-06-02 15:41 -0500
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/19f89eda8587

Description:

Fix TALOS-CAN-0118

diffstat:

 libpurple/protocols/mxit/protocol.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (14 lines):

diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -2806,8 +2806,9 @@ void mxit_cb_rx( gpointer user_data, gin
 				/* the end of the length record found */
 				session->rx_lbuf[session->rx_i] = '\0';
 				session->rx_res = atoi( &session->rx_lbuf[3] );
-				if ( session->rx_res > CP_MAX_PACKET ) {
+				if ( ( session->rx_res <= 0 ) || ( session->rx_res > CP_MAX_PACKET ) ) {
 					purple_connection_error( session->con, _( "A connection error occurred to MXit. (read stage 0x03)" ) );
+					return;
 				}
 				session->rx_state = RX_STATE_DATA;
 				session->rx_i = 0;



More information about the Commits mailing list