diff options
Diffstat (limited to 'libpurple/protocols')
-rw-r--r-- | libpurple/protocols/yahoo/libymsg.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c index 568489cf29..0874526533 100644 --- a/libpurple/protocols/yahoo/libymsg.c +++ b/libpurple/protocols/yahoo/libymsg.c @@ -1861,11 +1861,13 @@ static void yahoo_auth16_stage1_cb(PurpleUtilFetchUrlData *unused, gpointer user totalelements = g_strv_length(split_data); - if(totalelements == 1) + if(totalelements == 1) { response_no = strtol(split_data[0], NULL, 10); - else if(totalelements >= 2) { + } else if(totalelements == 2 || totalelements == 3 ) { response_no = strtol(split_data[0], NULL, 10); token = g_strdup(split_data[1] + strlen("ymsgr=")); + } else { /* It looks like a transparent proxy has returned an invalid document */ + response_no = -1; } g_strfreev(split_data); |