--- a/libpurple/protocols/silc/chat.c Thu Mar 21 05:09:08 2019 +0000 +++ b/libpurple/protocols/silc/chat.c Fri Mar 22 01:54:47 2019 +0000 @@ -387,7 +387,8 @@ SilcUInt32 pk_len; char *fingerprint, *babbleprint; SilcPublicKeyIdentifier ident; - char tmp2[1024], t[512]; + char tmp2[1024]; + const gchar *t; PurpleRequestFields *fields; PurpleRequestFieldGroup *g; PurpleRequestField *f; @@ -417,12 +418,11 @@ purple_request_field_group_add_field(g, f); purple_request_fields_add_group(fields, g); - g_snprintf(t, sizeof(t), - _("Channel authentication is used to secure the channel from " - "unauthorized access. The authentication may be based on " - "passphrase and digital signatures. If passphrase is set, it " - "is required to be able to join. If channel public keys are set " - "then only users whose public keys are listed are able to join.")); + t = _("Channel authentication is used to secure the channel from " + "unauthorized access. The authentication may be based on " + "passphrase and digital signatures. If passphrase is set, it " + "is required to be able to join. If channel public keys are set " + "then only users whose public keys are listed are able to join."); if (!channel_pubkeys || !silc_dlist_count(channel_pubkeys)) { f = purple_request_field_list_new("list", NULL); @@ -509,7 +509,7 @@ silcpurple_chat_prv_add(SilcPurpleCharPrv p, PurpleRequestFields *fields) { SilcPurple sg = p->sg; - char tmp[512]; + gchar *tmp; PurpleRequestField *f; const char *name, *passphrase, *alias; GHashTable *comp; @@ -528,9 +528,9 @@ alias = purple_request_field_string_get_value(f); /* Add private group to buddy list */ - g_snprintf(tmp, sizeof(tmp), "%s [Private Group]", name); + tmp = g_strdup_printf("%s [Private Group]", name); comp = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free); - g_hash_table_replace(comp, "channel", g_strdup(tmp)); + g_hash_table_replace(comp, "channel", tmp); g_hash_table_replace(comp, "passphrase", g_strdup(passphrase)); cn = purple_chat_new(sg->account, alias, comp);