/pidgin/main: f0287378203f: Fix TALOS-CAN-0139
Andrew Victor
andrew.victor at mxit.com
Mon Jun 20 20:09:57 EDT 2016
Changeset: f0287378203fbf496a9890bf273d96adefb93b74
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2016-06-03 11:50 -0500
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/f0287378203f
Description:
Fix TALOS-CAN-0139
diffstat:
libpurple/protocols/mxit/protocol.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 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
@@ -1819,6 +1819,12 @@ static void mxit_parse_cmd_extprofile( s
/* set the count for attributes */
count = atoi( records[0]->fields[1]->data );
+ /* ensure the packet has the correct number of fields */
+ if ( records[0]->fcount < ( 2 + ( count * 3 ) ) ) {
+ purple_debug_error( MXIT_PLUGIN_ID, "Insufficient number of fields in extprofile response. fields=%i records=%i", records[0]->fcount, count );
+ return;
+ }
+
for ( i = 0; i < count; i++ ) {
char* fname;
char* fvalue;
More information about the Commits
mailing list