qulogic/pidgin

Fix TALOS-CAN-0139
release-2.x.y
2016-06-03, Andrew Victor
f0287378203f
Parents 5e5e84e8a798
Children 285e174ab39c
Fix TALOS-CAN-0139
--- a/libpurple/protocols/mxit/protocol.c Sun May 15 05:41:39 2016 -0300
+++ b/libpurple/protocols/mxit/protocol.c Fri Jun 03 11:50:10 2016 -0500
@@ -1819,6 +1819,12 @@
/* 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;