forked from pool/pidgin
Accepting request 22620 from GNOME:Factory
Copy from GNOME:Factory/pidgin based on submit request 22620 from user dimstar OBS-URL: https://build.opensuse.org/request/show/22620 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pidgin?expand=0&rev=45
This commit is contained in:
parent
291d6fe0e8
commit
874a35ed10
74
pidgin-bnc548072.patch
Normal file
74
pidgin-bnc548072.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#
|
||||||
|
#
|
||||||
|
# patch "libpurple/protocols/oscar/oscar.c"
|
||||||
|
# from [42bbc1a4ff0b9b66e5487d7171b3cba95b6b9bd5]
|
||||||
|
# to [6325eced5c6845cea48a229ec93c04e881daf2b8]
|
||||||
|
#
|
||||||
|
============================================================
|
||||||
|
--- libpurple/protocols/oscar/oscar.c 42bbc1a4ff0b9b66e5487d7171b3cba95b6b9bd5
|
||||||
|
+++ libpurple/protocols/oscar/oscar.c 6325eced5c6845cea48a229ec93c04e881daf2b8
|
||||||
|
@@ -2874,25 +2874,46 @@ incomingim_chan4(OscarData *od, FlapConn
|
||||||
|
gchar **text;
|
||||||
|
text = g_strsplit(args->msg, "\376", 0);
|
||||||
|
if (text) {
|
||||||
|
- num = 0;
|
||||||
|
- for (i=0; i<strlen(text[0]); i++)
|
||||||
|
- num = num*10 + text[0][i]-48;
|
||||||
|
- for (i=0; i<num; i++) {
|
||||||
|
- struct name_data *data = g_new(struct name_data, 1);
|
||||||
|
- gchar *message = g_strdup_printf(_("ICQ user %u has sent you a buddy: %s (%s)"), args->uin, text[i*2+2], text[i*2+1]);
|
||||||
|
- data->gc = gc;
|
||||||
|
- data->name = g_strdup(text[i*2+1]);
|
||||||
|
- data->nick = g_strdup(text[i*2+2]);
|
||||||
|
+ /* Read the number of contacts that we were sent */
|
||||||
|
+ errno = 0;
|
||||||
|
+ num = strtoul(text[0], NULL, 10);
|
||||||
|
|
||||||
|
- purple_request_action(gc, NULL, message,
|
||||||
|
- _("Do you want to add this buddy "
|
||||||
|
- "to your buddy list?"),
|
||||||
|
- PURPLE_DEFAULT_ACTION_NONE,
|
||||||
|
- purple_connection_get_account(gc), data->name, NULL,
|
||||||
|
- data, 2,
|
||||||
|
- _("_Add"), G_CALLBACK(purple_icq_buddyadd),
|
||||||
|
- _("_Decline"), G_CALLBACK(oscar_free_name_data));
|
||||||
|
- g_free(message);
|
||||||
|
+ if (num > 0 && errno == 0) {
|
||||||
|
+ for (i=0; i<num; i++) {
|
||||||
|
+ struct name_data *data;
|
||||||
|
+ gchar *message;
|
||||||
|
+
|
||||||
|
+ if (!text[i*2 + 1] || !text[i*2 + 2]) {
|
||||||
|
+ /* We're missing the contact name or nickname. Bail out. */
|
||||||
|
+ gchar *tmp = g_strescape(args->msg, NULL);
|
||||||
|
+ purple_debug_error("oscar", "Unknown syntax parsing "
|
||||||
|
+ "ICQ buddies. args->msg=%s\n", tmp);
|
||||||
|
+ g_free(tmp);
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ message = g_strdup_printf(_("ICQ user %u has sent you a buddy: %s (%s)"), args->uin, text[i*2+2], text[i*2+1]);
|
||||||
|
+
|
||||||
|
+ data = g_new(struct name_data, 1);
|
||||||
|
+ data->gc = gc;
|
||||||
|
+ data->name = g_strdup(text[i*2+1]);
|
||||||
|
+ data->nick = g_strdup(text[i*2+2]);
|
||||||
|
+
|
||||||
|
+ purple_request_action(gc, NULL, message,
|
||||||
|
+ _("Do you want to add this buddy "
|
||||||
|
+ "to your buddy list?"),
|
||||||
|
+ PURPLE_DEFAULT_ACTION_NONE,
|
||||||
|
+ purple_connection_get_account(gc), data->name, NULL,
|
||||||
|
+ data, 2,
|
||||||
|
+ _("_Add"), G_CALLBACK(purple_icq_buddyadd),
|
||||||
|
+ _("_Decline"), G_CALLBACK(oscar_free_name_data));
|
||||||
|
+ g_free(message);
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ gchar *tmp = g_strescape(args->msg, NULL);
|
||||||
|
+ purple_debug_error("oscar", "Unknown syntax parsing "
|
||||||
|
+ "ICQ buddies. args->msg=%s\n", tmp);
|
||||||
|
+ g_free(tmp);
|
||||||
|
}
|
||||||
|
g_strfreev(text);
|
||||||
|
}
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 20 09:36:10 CEST 2009 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Add pidgin-bnc548072.patch, fixes crash with oscar (ICQ) protocol
|
||||||
|
bnc#548072.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Sep 23 19:48:37 UTC 2009 - aj@suse.de
|
Wed Sep 23 19:48:37 UTC 2009 - aj@suse.de
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
Name: pidgin
|
Name: pidgin
|
||||||
Summary: GTK+-Based Multiprotocol Instant Messaging Client
|
Summary: GTK+-Based Multiprotocol Instant Messaging Client
|
||||||
Version: 2.6.2
|
Version: 2.6.2
|
||||||
Release: 2
|
Release: 3
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: Productivity/Networking/Instant Messenger
|
Group: Productivity/Networking/Instant Messenger
|
||||||
Url: http://www.pidgin.im/
|
Url: http://www.pidgin.im/
|
||||||
@ -38,6 +38,8 @@ Patch11: pidgin-directconn-argfix.patch
|
|||||||
Patch12: pidgin-dbus-invalid-gpointer.patch
|
Patch12: pidgin-dbus-invalid-gpointer.patch
|
||||||
# PATCH-FIX-OPENSUSE pidgin-browser-default.patch bnc472219 sbrabec@suse.cz - Use xdg-open as default browser.
|
# PATCH-FIX-OPENSUSE pidgin-browser-default.patch bnc472219 sbrabec@suse.cz - Use xdg-open as default browser.
|
||||||
Patch13: pidgin-browser-default.patch
|
Patch13: pidgin-browser-default.patch
|
||||||
|
# PATCH-FIX-UPSTREAM pidgin-bnc548072.patch bnc#548072 dimstar@opensuse.org -- Fix a crash on Oscar (icq) protocol.
|
||||||
|
Patch14: pidgin-bnc548072.patch
|
||||||
# Can use external libzephyr
|
# Can use external libzephyr
|
||||||
BuildRequires: cyrus-sasl-devel
|
BuildRequires: cyrus-sasl-devel
|
||||||
BuildRequires: dbus-1-devel
|
BuildRequires: dbus-1-devel
|
||||||
|
Loading…
Reference in New Issue
Block a user