/pidgin/main: f0287378203f: Fix TALOS-CAN-0139
Andrew Victor <[email protected]> Mon, 20 Jun 2016 20:09:57 -0400
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: f0287378203fbf496a9890bf273d96adefb93b74 Author: Andrew Victor <[email protected]> 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; _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits